From 7b417be1ce29c549052e989ef2b628a0de0d0a79 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Sat, 10 Feb 2018 13:23:08 -0600 Subject: [PATCH] tests: Escape newlines in TAP description --- 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 11fb66d..9c6b145 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -141,8 +141,8 @@ run_test_internal() { local -a highlight_zone; highlight_zone=( ${(z)expected_region_highlight[$i]} ) local todo= integer start=$highlight_zone[1] end=$highlight_zone[2] - # Escape # as ♯ since the former is illegal in the 'description' part of TAP output - local desc="[$start,$end] «${BUFFER[$start,$end]//'#'/♯}»" + # Escape # as ♯ and newline as ↵ they are illegal in the 'description' part of TAP output + local desc="[$start,$end] «${${BUFFER[$start,$end]//'#'/♯}//$'\n'/↵}»" (( $+highlight_zone[4] )) && todo="# TODO $highlight_zone[4]" for j in {$start..$end}; do if