From 9d6ecea21c0c4328cf215091f8b99ab762039104 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 18 Oct 2018 23:45:17 +0000 Subject: [PATCH] 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 9523d6d49cb3d4db5bd84c3cec6168a2057fe3ab, which was wrong and is hereby reverted). The test that's now failing has been filed as issue #558. --- highlighters/main/test-data/alias.zsh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/highlighters/main/test-data/alias.zsh b/highlighters/main/test-data/alias.zsh index fd867bf..9a45367 100644 --- a/highlighters/main/test-data/alias.zsh +++ b/highlighters/main/test-data/alias.zsh @@ -29,10 +29,7 @@ alias alias1="unused expansion" alias -s alias2="echo" -if set -o | grep -q aliasfuncdef; then - setopt alias_func_def # 5.4+ -fi -alias1() {} # to check that it's highlighted as an alias, not as a function +function alias1() {} # to check that it's highlighted as an alias, not as a function BUFFER='x.alias2; alias1' @@ -50,5 +47,5 @@ if zmodload -e zsh/parameter || [[ "$(type -w x.alias2)" == *suffix* ]]; then fi expected_region_highlight+=( "9 9 commandseparator" # ; - "11 16 alias" # alias1 + "11 16 alias 'issue #558'" # alias1 )