mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 12:05:52 +00:00
simplified basic_set_terminal_title
This commit is contained in:
parent
02077db53e
commit
8a51172b11
@ -922,18 +922,6 @@ fn pager_failed_to_parse() {
|
||||
.stderr(predicate::str::contains("Could not parse pager command"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pager_set_terminal_title() {
|
||||
bat()
|
||||
.env("PAGER", mocked_pagers::from("echo pager-output"))
|
||||
.arg("--paging=always")
|
||||
.arg("--set-terminal-title")
|
||||
.arg("test.txt")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(predicate::str::contains("\u{1b}]0;bat: test.txt\x07pager-output\n").normalize());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn env_var_bat_paging() {
|
||||
@ -948,6 +936,18 @@ fn env_var_bat_paging() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn basic_set_terminal_title() {
|
||||
bat()
|
||||
.arg("--paging=always")
|
||||
.arg("--set-terminal-title")
|
||||
.arg("test.txt")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout("\u{1b}]0;bat: test.txt\x07hello world\n")
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn diagnostic_sanity_check() {
|
||||
bat()
|
||||
|
Loading…
x
Reference in New Issue
Block a user