simplified basic_set_terminal_title

This commit is contained in:
Oliver looney 2024-02-11 22:43:07 +00:00
parent 02077db53e
commit 8a51172b11
No known key found for this signature in database
1 changed files with 12 additions and 12 deletions

View File

@ -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()