From f0bae44b76dd60fa14f76e3a27e3a9a6490b63c3 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 5 May 2016 20:34:27 +0000 Subject: [PATCH] tests: Followup to last: echo(1) is evil. Use 'print -r --' instead, so literal backslashes in $BUFFER aren't expanded. Found-by: Matthew Martin --- tests/test-highlighting.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index 4b41d54..7b547bd 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -114,11 +114,11 @@ run_test_internal() { [[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]" for j in {$start..$end}; do if [[ "$observed_result[$j]" != "$highlight_zone[3]" ]]; then - echo "not ok $i - $desc - expected ${(qqq)highlight_zone[3]}, observed ${(qqq)observed_result[$j]}.$todo" + print -r -- "not ok $i - $desc - expected ${(qqq)highlight_zone[3]}, observed ${(qqq)observed_result[$j]}.$todo" continue 2 fi done - echo "ok $i - $desc${todo:+' - '}$todo" + print -r -- "ok $i - $desc${todo:+' - '}$todo" unset desc unset start end unset todo