File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -124,25 +124,26 @@ run_test_internal() {
124124 local -a expected_region_highlight region_highlight
125125
126126 local ARG=" $1 "
127+ local RETURN=" "
127128 () {
128129 setopt localoptions
129130 . " $srcdir " /" $ARG "
130131
131132 # WARNING: The remainder of this anonymous function will run with the test's options in effect
132133
133- (( $# skip_test )) && { print -r -- " 1..0 # SKIP $skip_test " ; return ; }
134+ (( $# skip_test )) && { print -r -- " 1..0 # SKIP $skip_test " ; return ${RETURN := 0} ; }
134135
135136 # Check the data declares $PREBUFFER or $BUFFER.
136- [[ -z $PREBUFFER && -z $BUFFER ]] && { echo >&2 " Bail out! On ${(qq)1} : Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank" ; return 1 ; }
137+ [[ -z $PREBUFFER && -z $BUFFER ]] && { echo >&2 " Bail out! On ${(qq)1} : Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank" ; return ${RETURN := 1} ; }
137138 # Check the data declares $expected_region_highlight.
138- (( $+ expected_region_highlight == 0 )) && { echo >&2 " Bail out! On ${(qq)1} : 'expected_region_highlight' is not declared." ; return 1 ; }
139+ (( $+ expected_region_highlight == 0 )) && { echo >&2 " Bail out! On ${(qq)1} : 'expected_region_highlight' is not declared." ; return ${RETURN := 1} ; }
139140
140141 # Set sane defaults for ZLE variables
141142 : ${CURSOR=$# BUFFER} ${PENDING=0} ${WIDGET=z-sy-h-test-harness-test-widget}
142143
143144 # Process the data.
144145 _zsh_highlight
145- }
146+ }; [[ -z $RETURN ]] || return $RETURN
146147 unset ARG
147148
148149 if (( unsorted )) ; then
You can’t perform that action at this time.
0 commit comments