on master help sign in
Add integration test for unparsable pager
9ccb667Martin Nordholts
tests/integration_tests.rs+11
@@ -522,6 +522,17 @@ fn alias_pager_disable_long_overrides_short() {
522 .stdout(predicate::eq("pager-output\n").normalize());
522 .stdout(predicate::eq("pager-output\n").normalize());
523}
523}
524
524
525+#[test]
526+fn pager_failed_to_parse() {
527+ bat()
528+ .env("BAT_PAGER", "mismatched-quotes 'a")
529+ .arg("--paging=always")
530+ .arg("test.txt")
531+ .assert()
532+ .failure()
533+ .stderr(predicate::str::contains("Could not parse pager command"));
534+}
535+
525#[test]
536#[test]
526fn config_location_test() {
537fn config_location_test() {
527 bat_with_config()
538 bat_with_config()