summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorStéphane Blondon <stephane.blondon@gmail.com>2024-04-14 17:17:58 +0200
committerMartin Nordholts <enselic@gmail.com>2024-04-19 11:44:47 +0200
commit23ec43316708b51f96ac3f9b5fc486494205236b (patch)
tree2da1a7545fe0db31dc6df94d301b2c990ca6d4e5 /tests
parent9eaed3e3f088d210467727201b0fb2b4e1e8f763 (diff)
display which theme is the default one in basic output
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_tests.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 9de8236a..0285ac26 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -273,7 +273,7 @@ fn squeeze_limit_line_numbers() {
}
#[test]
-fn list_themes() {
+fn list_themes_with_colors() {
#[cfg(target_os = "macos")]
let default_theme_chunk = "Monokai Extended Light\x1B[0m (default)";
@@ -291,6 +291,23 @@ fn list_themes() {
}
#[test]
+fn list_themes_without_colors() {
+ #[cfg(target_os = "macos")]
+ let default_theme_chunk = "Monokai Extended Light (default)";
+
+ #[cfg(not(target_os = "macos"))]
+ let default_theme_chunk = "Monokai Extended (default)";
+
+ bat()
+ .arg("--color=never")
+ .arg("--list-themes")
+ .assert()
+ .success()
+ .stdout(predicate::str::contains("DarkNeon").normalize())
+ .stdout(predicate::str::contains(default_theme_chunk).normalize());
+}
+
+#[test]
#[cfg_attr(any(not(feature = "git"), target_os = "windows"), ignore)]
fn short_help() {
test_help("-h", "../doc/short-help.txt");