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

This commit is contained in:
Martin Nordholts committed 2020-12-30 08:25:39 +01:00
1 parent 552545fe5f
commit 22bdc7c20f
3 files changed
+9 -8

No files matched your search

+2 -2
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]