Skip to content

Commit 02816d0

Browse files
committed
Bump bat version in test environment
And fix the theme script because it broke. With bat 0.25.0, the following command bat --list-themes --color=never ... lists the default dark and light themes appending " (default)" and " (default light)" to their names. But `bat --theme=<THEME_NAME>` doesn't recognize names with that part added in, so we have to remove it.
1 parent 209559b commit 02816d0

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

tests/docker/bat-test.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
FROM curlimages/curl:latest AS fetch-pkg
77
LABEL keep=false
8-
ARG BAT_VERSION=0.24.0
8+
ARG BAT_VERSION=0.25.0
99
RUN curl -LJ \
1010
https://github.com/sharkdp/bat/releases/download/v$BAT_VERSION/bat_${BAT_VERSION}_amd64.deb \
1111
--output /tmp/bat.deb

tests/docker/inner_theme_regression.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ synthetic_src="source/theme/synthetic.txt"
1010

1111
readarray -t themes <<< "$(bat --list-themes --color=never)"
1212

13-
for theme in "${themes[@]}"; do
13+
for theme_ in "${themes[@]}"; do
14+
# strip " (default)" and " (default light)" from theme name, because bat doesn't recognize that
15+
theme="${theme_% \(default*\)}"
16+
1417
$cmd_prefix --theme="$theme" $brief_src > "theme/brief-${theme}.txt"
1518

1619
synthetic_dest="theme/synthetic-${theme}.txt"

0 commit comments

Comments
 (0)