From c91182977159cfec891e4fb0be2a681bd33dcdba Mon Sep 17 00:00:00 2001 From: Oliver looney Date: Sat, 27 Jan 2024 14:23:24 +0000 Subject: [PATCH] fixed failing tests --- doc/long-help.txt | 3 +++ doc/short-help.txt | 2 ++ tests/integration_tests.rs | 14 +++++++------- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/long-help.txt b/doc/long-help.txt index 247120fb..cb43e520 100644 --- a/doc/long-help.txt +++ b/doc/long-help.txt @@ -50,6 +50,9 @@ Options: --diff-context Include N lines of context around added/removed/modified lines when using '--diff'. + --set_terminal_title + Sets terminal title to filenames when using a pager. + --tabs Set the tab width to T spaces. Use a width of 0 to pass tabs through directly diff --git a/doc/short-help.txt b/doc/short-help.txt index 118dbce2..2318fa58 100644 --- a/doc/short-help.txt +++ b/doc/short-help.txt @@ -21,6 +21,8 @@ Options: Specify the name to display for a file. -d, --diff Only show lines that have been added/removed/modified. + --set_terminal_title + Sets terminal title when using a pager --tabs Set the tab width to T spaces. --wrap diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 47a75e5c..be70fdca 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -653,7 +653,7 @@ fn pager_disable() { .arg("test.txt") .assert() .success() - .stdout(predicate::eq("\u{1b}]0;bat: test.txt\x07hello world\n").normalize()); + .stdout(predicate::eq("hello world\n").normalize()); } #[test] @@ -734,7 +734,7 @@ fn env_var_pager_value_bat() { .arg("test.txt") .assert() .success() - .stdout(predicate::eq("\u{1b}]0;bat: test.txt\x07hello world\n").normalize()); + .stdout(predicate::eq("hello world\n").normalize()); } #[test] @@ -772,7 +772,7 @@ fn pager_most_from_pager_env_var() { .arg("test.txt") .assert() .success() - .stdout(predicate::eq("\u{1b}]0;bat: test.txt\x07hello world\n").normalize()); + .stdout(predicate::eq("hello world\n").normalize()); }); } @@ -818,7 +818,7 @@ fn pager_most_with_arg() { .arg("test.txt") .assert() .success() - .stdout(predicate::eq("\u{1b}]0;bat: test.txt\x07hello world\n").normalize()); + .stdout(predicate::eq("hello world\n").normalize()); }); } @@ -833,7 +833,7 @@ fn pager_more() { .arg("test.txt") .assert() .success() - .stdout(predicate::eq("\u{1b}]0;bat: test.txt\x07hello world\n").normalize()); + .stdout(predicate::eq("hello world\n").normalize()); }); } @@ -896,7 +896,7 @@ fn enable_pager_if_disable_paging_flag_comes_before_paging() { .arg("test.txt") .assert() .success() - .stdout(predicate::eq("\u{1b}]0;bat: test.txt\x07pager-output\n").normalize()); + .stdout(predicate::eq("pager-output\n").normalize()); } #[test] @@ -908,7 +908,7 @@ fn enable_pager_if_pp_flag_comes_before_paging() { .arg("test.txt") .assert() .success() - .stdout(predicate::eq("\u{1b}]0;bat: test.txt\x07pager-output\n").normalize()); + .stdout(predicate::eq("pager-output\n").normalize()); } #[test]