From 23ec43316708b51f96ac3f9b5fc486494205236b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Blondon?= Date: Sun, 14 Apr 2024 17:17:58 +0200 Subject: display which theme is the default one in basic output --- tests/integration_tests.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tests') 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)"; @@ -290,6 +290,23 @@ fn list_themes() { .stdout(predicate::str::contains("Output the square of a number.").normalize()); } +#[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() { -- cgit v1.2.3