tests: Set ZSH_HIGHLIGHT_STYLES=() during tests
Since the _zsh_highlight_add_highlight that the tests use ignores ZSH_HIGHLIGHT_STYLES, we can test both an injective mapping and an empty mapping at once.
This commit is contained in:
@@ -153,6 +153,7 @@ fi
|
||||
|
||||
# Process each test data file in test data directory.
|
||||
integer something_failed=0
|
||||
ZSH_HIGHLIGHT_STYLES=()
|
||||
for data_file in ${0:h:h}/highlighters/$1/test-data/*.zsh; do
|
||||
run_test "$data_file" | tee >($results_filter | ${0:A:h}/tap-colorizer.zsh) | grep -v '^not ok.*# TODO' | grep -Eq '^not ok|^ok.*# TODO' && (( something_failed=1 ))
|
||||
(( $pipestatus[1] )) && exit 2
|
||||
|
||||
Reference in New Issue
Block a user