Skip to content

Commit

Permalink
Add tests against issue sharkdp#2731
Browse files Browse the repository at this point in the history
  • Loading branch information
einfachIrgendwer0815 committed Oct 18, 2024
1 parent fd6c763 commit e416d30
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,31 @@ fn enable_pager_if_pp_flag_comes_before_paging() {
.stdout(predicate::eq("pager-output\n").normalize());
}

#[test]
fn paging_partially_overrides_plain() {
bat()
.env("PAGER", "echo pager-output")
.arg("--decorations=always")
.arg("--plain")
.arg("--paging=never")
.arg("test.txt")
.assert()
.success()
.stdout(predicate::eq("hello world\n"));
}

#[test]
fn simple_plain_does_not_override_paging() {
bat()
.env("PAGER", "echo pager-output")
.arg("--paging=always")
.arg("--plain")
.arg("test.txt")
.assert()
.success()
.stdout(predicate::eq("pager-output\n"));
}

#[test]
fn pager_failed_to_parse() {
bat()
Expand Down

0 comments on commit e416d30

Please sign in to comment.