When PAGER=most, don't print a warning to stderr, silently use less instead

This commit is contained in:
Martin Nordholts
2020-12-30 08:11:44 +01:00
parent 552545fe5f
commit 22bdc7c20f
3 changed files with 9 additions and 8 deletions

View File

@ -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]