tests: Add a regression test for issue #392 (aliases beginning with a '+' are lost).
This commit is contained in:
parent
67be62107b
commit
5efd062a4d
@ -61,7 +61,19 @@ fi
|
||||
[[ -n $results_filter ]] || { echo >&2 "Bail out! BUG setting \$results_filter"; exit 2 }
|
||||
|
||||
# Load the main script.
|
||||
# While here, test that it doesn't eat aliases.
|
||||
print > >($results_filter | ${0:A:h}/tap-colorizer.zsh) -r -- "# global (driver) tests"
|
||||
print > >($results_filter | ${0:A:h}/tap-colorizer.zsh) -r -- "1..1"
|
||||
alias -- +plus=plus
|
||||
alias -- _other=other
|
||||
original_alias_dash_L_output="$(alias -L)"
|
||||
. ${0:h:h}/zsh-syntax-highlighting.zsh
|
||||
if [[ $original_alias_dash_L_output == $(alias -L) ]]; then
|
||||
print -r -- "ok 1 # 'alias -- +foo=bar' is preserved"
|
||||
else
|
||||
print -r -- "not ok 1 # 'alias -- +foo=bar' is preserved"
|
||||
exit 1
|
||||
fi > >($results_filter | ${0:A:h}/tap-colorizer.zsh)
|
||||
|
||||
# Overwrite _zsh_highlight_add_highlight so we get the key itself instead of the style
|
||||
_zsh_highlight_add_highlight()
|
||||
|
Loading…
Reference in New Issue
Block a user