Skip to content

Commit 3414c7c

Browse files
committed
test harness: Include $PREBUFFER and $BUFFER in the output.
For human readers' benefit.
1 parent 4a043b4 commit 3414c7c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test-highlighting.zsh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,15 @@ run_test_internal() {
117117
local srcdir="$PWD"
118118
builtin cd -q -- "$tests_tempdir" || { echo >&2 "Bail out! On ${(qq)1}: cd failed: $?"; return 1 }
119119

120-
echo "# ${1:t:r}"
121-
122120
# Load the data and prepare checking it.
123121
local BUFFER CURSOR MARK PENDING PREBUFFER REGION_ACTIVE WIDGET REPLY skip_test unsorted=0
124122
local expected_mismatch
125123
local -a expected_region_highlight region_highlight
124+
125+
echo "# ${1:t:r}"
126+
[[ -n $PREBUFFER ]] && printf '# %s\n' "$(typeset_p PREBUFFER)"
127+
[[ -n $BUFFER ]] && printf '# %s\n' "$(typeset_p BUFFER)"
128+
126129
. "$srcdir"/"$1"
127130

128131
(( $#skip_test )) && { print -r -- "1..0 # SKIP $skip_test"; return; }

0 commit comments

Comments
 (0)