on master help sign in
Add integration tests
commitbfac6fd85c43caf0b24ff1b9c9619d1099360a2c authorDash Peters <dpeters@calacademy.org> dateTue 30 Jun 2020, 12:41 (6 years ago) parent2575aae
1 file changed+23
tests/integration_tests.rs+23
tests/integration_tests.rs+23
@@ -405,6 +405,29 @@ fn pager_disable() {
405405 .stdout(predicate::eq("hello world\n").normalize());
406406}
407407
408+#[test]
409+fn alias_pager_disable() {
410+ bat()
411+ .env("PAGER", "echo other-pager")
412+ .arg("-P")
413+ .arg("test.txt")
414+ .assert()
415+ .success()
416+ .stdout(predicate::eq("hello world\n").normalize());
417+}
418+
419+#[test]
420+fn alias_pager_disable_long_overrides_short() {
421+ bat()
422+ .env("PAGER", "echo pager-output")
423+ .arg("-P")
424+ .arg("--paging=always")
425+ .arg("test.txt")
426+ .assert()
427+ .success()
428+ .stdout(predicate::eq("pager-output\n").normalize());
429+}
430+
408431#[test]
409432fn config_location_test() {
410433 bat_with_config()