mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
test harness: Tweak quiet-test output
- Print the test name and data after the plan line
- Split on the plan line rather than on comments
+ That makes tap-filter more suitable to filter TAP output generated by other
TAP producers.
+ However, the filtered output deletes the plan line and adds a blank line in
its stead. This suits our use-case of interactive test runs.
This commit is contained in:
parent
3414c7c0d2
commit
2b3638a211
2 changed files with 8 additions and 5 deletions
|
|
@ -122,10 +122,6 @@ run_test_internal() {
|
|||
local expected_mismatch
|
||||
local -a expected_region_highlight region_highlight
|
||||
|
||||
echo "# ${1:t:r}"
|
||||
[[ -n $PREBUFFER ]] && printf '# %s\n' "$(typeset_p PREBUFFER)"
|
||||
[[ -n $BUFFER ]] && printf '# %s\n' "$(typeset_p BUFFER)"
|
||||
|
||||
. "$srcdir"/"$1"
|
||||
|
||||
(( $#skip_test )) && { print -r -- "1..0 # SKIP $skip_test"; return; }
|
||||
|
|
@ -146,7 +142,12 @@ run_test_internal() {
|
|||
expected_region_highlight=("${(@n)expected_region_highlight}")
|
||||
fi
|
||||
|
||||
# Print the plan line, and some comments for human readers
|
||||
echo "1..$(( $#expected_region_highlight + 1))"
|
||||
echo "## ${1:t:r}"
|
||||
[[ -n $PREBUFFER ]] && printf '# %s\n' "$(typeset_p PREBUFFER)"
|
||||
[[ -n $BUFFER ]] && printf '# %s\n' "$(typeset_p BUFFER)"
|
||||
|
||||
local i
|
||||
for ((i=1; i<=$#expected_region_highlight; i++)); do
|
||||
local -a expected_highlight_zone; expected_highlight_zone=( ${(z)expected_region_highlight[i]} )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue