mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-25 01:03:46 +01:00
Add tests against issue #2731
This commit is contained in:
parent
fd6c7637e4
commit
e667415def
@ -1020,6 +1020,31 @@ fn enable_pager_if_pp_flag_comes_before_paging() {
|
||||
.stdout(predicate::eq("pager-output\n").normalize());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn paging_does_not_override_simple_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()
|
||||
|
Loading…
Reference in New Issue
Block a user