From 11c060ab765a2e08b829f90ae81e53fe5a203492 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 23 Oct 2015 04:26:51 +0000 Subject: [PATCH] test harness: Fix a bug whereby 'todo' state would propagate to all subsequent test points. Update expectations on the subshell test (which triggered this bug, since it has a passing test point following a 'todo' test point). --- highlighters/main/test-data/subshell.zsh | 4 ++-- tests/test-highlighting.zsh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/highlighters/main/test-data/subshell.zsh b/highlighters/main/test-data/subshell.zsh index 378e083..f013eb1 100644 --- a/highlighters/main/test-data/subshell.zsh +++ b/highlighters/main/test-data/subshell.zsh @@ -30,7 +30,7 @@ BUFFER='tar cf - * | (cd /target; tar xfp -)' expected_region_highlight=( - "1 3 $ZSH_HIGHLIGHT_STYLES[command] 'not yet implemented'" # tar + "1 3 $ZSH_HIGHLIGHT_STYLES[command]" # tar "15 16 $ZSH_HIGHLIGHT_STYLES[command] 'not yet implemented'" # cd - "27 29 $ZSH_HIGHLIGHT_STYLES[command] 'not yet implemented'" # tar + "27 29 $ZSH_HIGHLIGHT_STYLES[command]" # tar ) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index d855e2e..c77b3ca 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -91,9 +91,9 @@ run_test() { done # Then we compare the observed result with the expected one. - local todo echo "1..${#expected_region_highlight}" for i in {1..${#expected_region_highlight}}; do + local todo= highlight_zone=${(z)expected_region_highlight[$i]} [[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]" for j in {$highlight_zone[1]..$highlight_zone[2]}; do