Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] correct ztst documentation error
- X-seq: zsh-workers 53515
- From: dana <dana@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] correct ztst documentation error
- Date: Fri, 25 Apr 2025 21:27:01 -0500
- Archived-at: <https://zsh.org/workers/53515>
- Feedback-id: i9be146f9:Fastmail
- List-id: <zsh-workers.zsh.org>
in workers/37205 the documentation for the *> / *? pattern-match syntax in the
test harness was changed to indicate that only the lines in the chunk that are
preceded by a * are subject to pattern-matching. this isn't true -- *any* line
with a * turns pattern-matching on for the entire diff of that stream
the previous documentation was also inaccurate, so i suggest the following
i actually think it should require that all lines in a chunk (or at least all
lines for the same stream) use the same syntax, because it's just confusing
otherwise. but it turns out that a lot of existing tests rely on the current
behaviour and i don't feel like changing all of them rn
dana
diff --git a/Test/B01cd.ztst b/Test/B01cd.ztst
index bc6757549..e31341478 100644
--- a/Test/B01cd.ztst
+++ b/Test/B01cd.ztst
@@ -57,13 +57,13 @@
# subsequent whitespace being significant; lines are not subject to any
# substitution unless the `q' flag (see below) is set.
#
-# Each line of a '>' and '?' chunk may be preceded by a '*', so the line
-# starts '*>' or '*?'. This signifies that for any line with '*' in front
-# the actual output should be pattern matched against the corresponding
-# lines in the test output. Each line following '>' or '?' must be a
-# valid pattern, so characters special to patterns such as parentheses
-# must be quoted with a backslash. The EXTENDED_GLOB option is used for
-# all such patterns.
+# If any '>' or '?' line in a chunk is preceded by a '*', all lines in
+# that chunk with the same symbol are pattern matched against the
+# corresponding lines in the test output. For example, a '*>' anywhere
+# in the chunk causes all other '>' lines to use pattern matching.
+# Each line following '>' or '?' must be a valid pattern, so characters
+# special to patterns such as parentheses must be quoted with a
+# backslash. The EXTENDED_GLOB option is used for all such patterns.
#
# Each chunk of indented code is to be evaluated in one go and is to
# be followed by a line starting (in the first column) with
Messages sorted by:
Reverse Date,
Date,
Thread,
Author