mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-01 19:02:22 +01:00
Throws an error when bat
is being user as pager.
As mentioned on #1334 `bat` should not be used as a value for `pager`, this change checks both the balue of `bat` provided as a parameter or as an environment variable.
This commit is contained in:
committed by
David Peter
parent
072fb380d8
commit
9837948c3a
@@ -405,6 +405,16 @@ fn pager_disable() {
|
||||
.stdout(predicate::eq("hello world\n").normalize());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pager_value_bat() {
|
||||
bat()
|
||||
.arg("--pager=bat")
|
||||
.arg("--paging=always")
|
||||
.arg("test.txt")
|
||||
.assert()
|
||||
.failure();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn alias_pager_disable() {
|
||||
bat()
|
||||
|
Reference in New Issue
Block a user