You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test harness: Fix use of an undefined variable in an error message.
The error message uses «$1», but it is always unset at that point.
Furthermore, the NO_UNSET (-u) option is in effect. Therefore, when the
error message was to be printed, zsh's NO_UNSET error message was
printed instead:
.
(anon):20: 1: parameter not set
That error message was printed to stderr, and was caught by the caller
within the test harness:
.
Bail out! On './highlighters/main/test-data/path_prefix3.zsh': output on stderr
Thus, the bug being fixed would not caused false positive or false
negative test results, but only wrong error messages.
Follow-up to 0.7.1-71-ge6eea1f, "test harness: Don't leak options from
test files to the test harness".
Copy file name to clipboardExpand all lines: tests/test-highlighting.zsh
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,7 @@ run_test_internal() {
144
144
}
145
145
146
146
# Check the data declares $PREBUFFER or $BUFFER.
147
-
[[ -z$PREBUFFER&&-z$BUFFER ]] && { echo>&2"Bail out! On ${(qq)1}: Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank";return${RETURN:=1}; }
147
+
[[ -z$PREBUFFER&&-z$BUFFER ]] && { echo>&2"Bail out! On ${(qq)ARG}: Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank";return${RETURN:=1}; }
0 commit comments