From bfac6fd85c43caf0b24ff1b9c9619d1099360a2c Mon Sep 17 00:00:00 2001 From: Dash Peters Date: Tue, 30 Jun 2020 12:41:50 -0700 Subject: [PATCH] Add integration tests --- tests/integration_tests.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index c1fce864..7991083b 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -405,6 +405,29 @@ fn pager_disable() { .stdout(predicate::eq("hello world\n").normalize()); } +#[test] +fn alias_pager_disable() { + bat() + .env("PAGER", "echo other-pager") + .arg("-P") + .arg("test.txt") + .assert() + .success() + .stdout(predicate::eq("hello world\n").normalize()); +} + +#[test] +fn alias_pager_disable_long_overrides_short() { + bat() + .env("PAGER", "echo pager-output") + .arg("-P") + .arg("--paging=always") + .arg("test.txt") + .assert() + .success() + .stdout(predicate::eq("pager-output\n").normalize()); +} + #[test] fn config_location_test() { bat_with_config()