From 37b6f5052f5c45f525e4d46f70be6fb8a1052dc1 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 15 Mar 2020 13:33:09 +0000 Subject: [PATCH] test harness: Update tests/edit-failed-tests for harness output changes in commit 2b3638a211cca4790c5b3b4f607edc0b0b2b6c73, "test harness: Tweak quiet-test output". --- tests/edit-failed-tests | 2 +- tests/test-highlighting.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/edit-failed-tests b/tests/edit-failed-tests index 9112c2a..e3a7668 100755 --- a/tests/edit-failed-tests +++ b/tests/edit-failed-tests @@ -32,7 +32,7 @@ type perl sponge >/dev/null || { print -ru2 -- "$0: This script requires perl(1) local editor=( "${(@Q)${(z)${VISUAL:-${EDITOR:-vi}}}}" ) () { - > "$2" perl -nE '$highlighter = $1 if /^Running test (\S*)/; say "highlighters/${highlighter}/test-data/$1.zsh" if /^# (\S*)/' "$1" + > "$2" perl -nE '$highlighter = $1 if /^Running test (\S*)/; say "highlighters/${highlighter}/test-data/$1.zsh" if /^## (\S*)/' "$1" >>"$2" echo "" >>"$2" cat <"$1" "${editor[@]}" -- "$2" diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index be95b51..c75c844 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -144,7 +144,7 @@ run_test_internal() { # Print the plan line, and some comments for human readers echo "1..$(( $#expected_region_highlight + 1))" - echo "## ${1:t:r}" + echo "## ${1:t:r}" # note: tests/edit-failed-tests looks for the "##" emitted by this line [[ -n $PREBUFFER ]] && printf '# %s\n' "$(typeset_p PREBUFFER)" [[ -n $BUFFER ]] && printf '# %s\n' "$(typeset_p BUFFER)"