1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 19:02:22 +01:00

Simplify and polish pager.rs and related code

This commit is contained in:
Martin Nordholts
2020-12-28 22:29:03 +01:00
parent cc0f8ca813
commit dcfe883f4b
4 changed files with 22 additions and 22 deletions

View File

@@ -423,7 +423,7 @@ fn pager_most() {
.arg("test.txt")
.assert()
.success()
.stderr(predicate::eq("WARNING: Ignoring PAGER=\"most\": Coloring not supported. Override with BAT_PAGER=\"most\" or --pager \"most\"\n").normalize())
.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());
}
@@ -435,7 +435,7 @@ fn pager_most_with_arg() {
.arg("test.txt")
.assert()
.success()
.stderr(predicate::eq("WARNING: Ignoring PAGER=\"most -w\": Coloring not supported. Override with BAT_PAGER=\"most -w\" or --pager \"most -w\"\n").normalize())
.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());
}