mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-14 18:25:55 +02:00
When PAGER=most, don't print a warning to stderr, silently use less instead
This commit is contained in:
@ -423,8 +423,8 @@ fn pager_most() {
|
||||
.arg("test.txt")
|
||||
.assert()
|
||||
.success()
|
||||
.stderr(predicate::eq("\x1b[33m[bat warning]\x1b[0m: Ignoring PAGER=\"most\": Coloring not supported. Override with BAT_PAGER=\"most\" or --pager \"most\"\n").normalize())
|
||||
.stdout(predicate::eq("hello world\n").normalize());
|
||||
// TODO: How to ensure less is used?
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -435,8 +435,8 @@ fn pager_most_with_arg() {
|
||||
.arg("test.txt")
|
||||
.assert()
|
||||
.success()
|
||||
.stderr(predicate::eq("\x1b[33m[bat warning]\x1b[0m: Ignoring PAGER=\"most -w\": Coloring not supported. Override with BAT_PAGER=\"most -w\" or --pager \"most -w\"\n").normalize())
|
||||
.stdout(predicate::eq("hello world\n").normalize());
|
||||
// TODO: How to ensure less is used?
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user