Browse Source

tests: TAP compliance: Do not emit literal '#' in the 'description' part

pull/309/head
Daniel Shahaf 8 years ago
parent
commit
21207c336a
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tests/test-highlighting.zsh

+ 2
- 1
tests/test-highlighting.zsh View File

@ -110,7 +110,8 @@ run_test_internal() {
[[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]" [[ -n "$highlight_zone[4]" ]] && todo=" # TODO $highlight_zone[4]"
for j in {$highlight_zone[1]..$highlight_zone[2]}; do for j in {$highlight_zone[1]..$highlight_zone[2]}; do
if [[ "$observed_result[$j]" != "$highlight_zone[3]" ]]; then 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 continue 2
fi fi
done done

Loading…
Cancel
Save