diff options
author | sblondon <stephane.blondon@gmail.com> | 2024-04-14 15:54:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-14 15:54:52 +0200 |
commit | d5bd4aa93fe3ff8643c0dd0cdb8700e8430d7931 (patch) | |
tree | f21f6e407fc457824a87d31cb960c9d96d4b0347 /tests/integration_tests.rs | |
parent | 66b70dd8ed1b673605d02408ac258cd34e19991d (diff) |
display which theme is the default one in colored output (#2838)
Diffstat (limited to 'tests/integration_tests.rs')
-rw-r--r-- | tests/integration_tests.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index d6523366..9de8236a 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -273,6 +273,24 @@ fn squeeze_limit_line_numbers() { } #[test] +fn list_themes() { + #[cfg(target_os = "macos")] + let default_theme_chunk = "Monokai Extended Light\x1B[0m (default)"; + + #[cfg(not(target_os = "macos"))] + let default_theme_chunk = "Monokai Extended\x1B[0m (default)"; + + bat() + .arg("--color=always") + .arg("--list-themes") + .assert() + .success() + .stdout(predicate::str::contains("DarkNeon").normalize()) + .stdout(predicate::str::contains(default_theme_chunk).normalize()) + .stdout(predicate::str::contains("Output the square of a number.").normalize()); +} + +#[test] #[cfg_attr(any(not(feature = "git"), target_os = "windows"), ignore)] fn short_help() { test_help("-h", "../doc/short-help.txt"); |