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

tests: Followup to last: echo(1) is evil.

Use 'print -r --' instead, so literal backslashes in $BUFFER aren't expanded.

Found-by: Matthew Martin
pull/309/head
Daniel Shahaf 8 лет назад
Родитель
Сommit
f0bae44b76
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      tests/test-highlighting.zsh

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

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