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.
* commit 'b1f36d9c5f45b879fbd2f64195167a60d9f3cb9e':
'main': Add a comment.
'main': Fix the $CDPATH from the previous commit.
'main': Add a test for a $CDPATH bug.
* danielsh/tests-skip-cardinality-v1:
tests: Minor documentation readability tweak
Add a test for issue #641.5, using the infrastructure added in the previous commits.
tests: Skip cardinality tests whenever any test point is expected to fail.
tests: Make $expected_mismatch skip the cardinality check, rather than consider it an expected failure.
tests: Include the name of the 'cardinality check' test point in the output
Before this commit, the command word was highlighted as "unknown-token"
not because alias loops are invalid, as a comment incorrectly claimed,
but because the command word «a» resolved to a «b» that was ineligible
for being expanded as an alias, and there was no function/builtin/etc.
called "b".
Add a function "b" to demonstrate that alias loops are valid. I've also
filed issue #695 about the overloading of "unknown-token".
Fixes#501.
Fixes#616 (the original form; not the form in
test-data/alias-comment1.zsh which is now considered o be #677 (see
previous commit for details)).
Fixes a latent bug in test-data/always2.zsh.
No user-visible effect, and therefore, no changelog entry.