Просмотр исходного кода

tests: Escape newlines in TAP description

pull/492/head
Matthew Martin 6 лет назад
Родитель
Сommit
7b417be1ce
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      tests/test-highlighting.zsh

+ 2
- 2
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

Загрузка…
Отмена
Сохранить