summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOliver looney <oliverjlooney@gmail.com>2024-01-27 14:31:28 +0000
committerOliver looney <oliverjlooney@gmail.com>2024-01-27 14:31:28 +0000
commitf6d76e01041bda2cb505eab16a643d1dc4c0ce38 (patch)
tree9ae648f9651016a297ee7ee7d7929f632cb1b32e /tests
parentc91182977159cfec891e4fb0be2a681bd33dcdba (diff)
added integration test for setting terminal title
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_tests.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index be70fdca..b6150a77 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -923,6 +923,21 @@ fn pager_failed_to_parse() {
}
#[test]
+fn pager_set_terminal_title() {
+ mocked_pagers::with_mocked_versions_of_more_and_most_in_path(|| {
+ 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() {
mocked_pagers::with_mocked_versions_of_more_and_most_in_path(|| {
@@ -2430,3 +2445,5 @@ fn highlighting_independant_from_map_syntax_case() {
.stdout(expected)
.stderr("");
}
+
+