File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -62,18 +62,15 @@ run_test_internal() {
6262 local srcdir=" $PWD "
6363 builtin cd -q -- " $tests_tempdir " || { echo >&2 " Bail out! cd failed: $? " ; return 1 }
6464
65- echo -n " # ${1: t: r} : "
66-
6765 # Load the data and prepare checking it.
6866 PREBUFFER= BUFFER= ;
6967 . " $srcdir " /" $1 "
7068
7169 # Check the data declares $PREBUFFER or $BUFFER.
7270 [[ -z $PREBUFFER && -z $BUFFER ]] && { echo >&2 " Bail out! Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank" ; return 1; }
7371
74- # Measure the time taken by _zsh_highlight.
75- TIMEFMT=" %*Es"
76- { time (BUFFER=" $BUFFER " && _zsh_highlight) } 2>&1
72+ # Set $? for _zsh_highlight
73+ true && _zsh_highlight
7774}
7875
7976run_test () {
@@ -93,9 +90,10 @@ run_test() {
9390
9491# Process each test data file in test data directory.
9592local data_file
96- for data_file in ${0: h: h} /highlighters/$1 /test-data/* .zsh; do
93+ TIMEFMT=" %*Es"
94+ { time (for data_file in ${0: h: h} /highlighters/$1 /test-data/* .zsh; do
9795 run_test " $data_file "
9896 (( $pipestatus [1 ] )) && exit 2
99- done
97+ done) } 2>&1 || exit $?
10098
10199exit 0
You can’t perform that action at this time.
0 commit comments