Skip to content

Commit 319811d

Browse files
committed
fix test: use builtin pager instead of less, revert to warn for all missing pagers
1 parent 2c1a8ca commit 319811d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/output.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,10 @@ impl OutputType {
105105
let resolved_path = match grep_cli::resolve_binary(&pager.bin) {
106106
Ok(path) => path,
107107
Err(_) => {
108-
if pager.bin != "less" {
109-
crate::bat_warning!(
110-
"Pager '{}' not found, outputting to stdout instead",
111-
pager.bin
112-
);
113-
}
108+
crate::bat_warning!(
109+
"Pager '{}' not found, outputting to stdout instead",
110+
pager.bin
111+
);
114112
return Ok(OutputType::stdout());
115113
}
116114
};

tests/integration_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,7 @@ fn env_var_bat_paging() {
14581458
fn basic_set_terminal_title() {
14591459
bat()
14601460
.arg("--paging=always")
1461+
.arg("--pager=builtin")
14611462
.arg("--set-terminal-title")
14621463
.arg("test.txt")
14631464
.assert()

0 commit comments

Comments
 (0)