mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-09 23:57:48 +02:00
display which theme is the default one in basic output
This commit is contained in:
committed by
Martin Nordholts
parent
9eaed3e3f0
commit
23ec433167
@ -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() {
|
||||
|
Reference in New Issue
Block a user