(q-) passes through newlines and NUL bytes verbatim. Using (qqqq) ensures the
escaped string will be on a single line (as required by the TAP format) and be
readable even if it contains control characters.
Fixes#202.
Test expectations are updated. For example, BUFFER='/bin' is now
highlighted as path_prefix because it's a prefix of '/bin/sh' which
would be valid. However, BUFFER='/bin;' is now properly highlighted
as an error (unless AUTO_CD is set).
Fixes an issue whereby the '# TODO "issue #687"' directive in the output of
opt-shwordsplit1.zsh was truncated, because the test itself had set the
SH_WORD_SPLIT option and that affected the evaluation of
«${(z)expected_region_highlight[i]}» in the test harness.
Furthermore, this patch also independently fixes the error under
zsh-5.0.8 and earlier that was fixed by the previous commit.
The output of test-data/opt-shwordsplit1.zsh on zsh 5.7 is:
.
1..2
## opt-shwordsplit1
# BUFFER=vim
not ok 1 - [1,7] «$EDITOR» - expected (1 7 "function"), observed (1 7 "unknown-token"). # TODO "issue
ok 2 - cardinality check # SKIP cardinality check disabled whilst regular test points are expected to fail
On zsh 5.0.8, tap_escape() choked when called on the arguments argv=('[1,7]'
'«vim»'). This patch fixes that.
As you may have noticed, under zsh 5.7 the diagnostic message of test point 1
is truncated. That'll be fixed in the next commit.
The escaped caret was taken for a negated character class. This caused test-data/arith1.zsh
to XPass: the arithmetic expansion was consumed by the 'while' loop.
This is not perfect: we don't try to detect cases such as «$((ls); (ls))»,
which look like arithmetic expansions but are in fact command substitutions.
Fixes part of #607.
Introduces #704.
The cardinality check shall —
- if the test sets \$expected_mismatch, be XFail;
- elif any test points is XFail, be skipped;
- else, be expected to pass.
To test this, change «6 * 9» to «6 + 9» in test-data/arith1.zsh that
will be added in the after-next (grandchild) commit.