From 21207c336a538658e13f2a14f297ff2393adc906 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 5 May 2016 18:40:13 +0000 Subject: [PATCH] tests: TAP compliance: Do not emit literal '#' in the 'description' part --- tests/test-highlighting.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index e232b3f..9c771ad 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -110,7 +110,8 @@ run_test_internal() { [[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]" for j in {$highlight_zone[1]..$highlight_zone[2]}; do if [[ "$observed_result[$j]" != "$highlight_zone[3]" ]]; then - echo "not ok $i ${(qqq)BUFFER[$highlight_zone[1],$highlight_zone[2]]} [$highlight_zone[1],$highlight_zone[2]]: expected ${(qqq)highlight_zone[3]}, observed ${(qqq)observed_result[$j]}.$todo" + # Escape # as ♯ since the former is illegal in the 'description' part of TAP output + echo "not ok $i ${(qqq)BUFFER[$highlight_zone[1],$highlight_zone[2]]//'#'/♯} [$highlight_zone[1],$highlight_zone[2]]: expected ${(qqq)highlight_zone[3]}, observed ${(qqq)observed_result[$j]}.$todo" continue 2 fi done