Fix a long-standing bug in a unit test. This uncovers a regression.

The test never actually defined a function named 'alias1', not even
when zsh 5.4 warned it about this (see 9523d6d49c,
which was wrong and is hereby reverted).

The test that's now failing has been filed as issue #558.
This commit is contained in:
Daniel Shahaf 2018-10-18 23:45:17 +00:00
parent 47c2b7e185
commit 9d6ecea21c

View File

@ -29,10 +29,7 @@
alias alias1="unused expansion" alias alias1="unused expansion"
alias -s alias2="echo" alias -s alias2="echo"
if set -o | grep -q aliasfuncdef; then function alias1() {} # to check that it's highlighted as an alias, not as a function
setopt alias_func_def # 5.4+
fi
alias1() {} # to check that it's highlighted as an alias, not as a function
BUFFER='x.alias2; alias1' BUFFER='x.alias2; alias1'
@ -50,5 +47,5 @@ if zmodload -e zsh/parameter || [[ "$(type -w x.alias2)" == *suffix* ]]; then
fi fi
expected_region_highlight+=( expected_region_highlight+=(
"9 9 commandseparator" # ; "9 9 commandseparator" # ;
"11 16 alias" # alias1 "11 16 alias 'issue #558'" # alias1
) )