zsh-workers
 help / color / mirror / code / Atom feed
* Test syntax documentation in B01cd is wrong?
@ 2015-11-22 22:05 Bart Schaefer
  2015-11-23 15:26 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2015-11-22 22:05 UTC (permalink / raw)
  To: zsh-workers

The comment says:

# The first line (only) of a '>' and '?' chunk may be preceded by a '*',
# so the line starts '*>' or '*?'.  This signifies that all lines in the
# chunk (not just the one with the '*' in front) in the actual output
# are pattern matched against the corresponding lines in the test
# output.

But in fact it appears you have to start EVERY line that needs to be
pattern matched with "*>" or "*?" -- see, for example, in A02alias:

0:Aliasing reserved tokens
>begin
>end
*>*5*{ begin
*>*6*{end

Not only is that not *> on the first line, but there are two lines with
the leading splat.  Similarly in B06fc.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test syntax documentation in B01cd is wrong?
  2015-11-22 22:05 Test syntax documentation in B01cd is wrong? Bart Schaefer
@ 2015-11-23 15:26 ` Peter Stephenson
  2015-11-23 17:12   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2015-11-23 15:26 UTC (permalink / raw)
  To: zsh-workers

On Sun, 22 Nov 2015 14:05:33 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> The comment says:
> 
> # The first line (only) of a '>' and '?' chunk may be preceded by a '*',
> # so the line starts '*>' or '*?'.  This signifies that all lines in the
> # chunk (not just the one with the '*' in front) in the actual output
> # are pattern matched against the corresponding lines in the test
> # output.
> 
> But in fact it appears you have to start EVERY line that needs to be
> pattern matched with "*>" or "*?" -- see, for example, in A02alias:

Looks to me from the test driver that it should work on *any* line, not
just the first.

pws


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test syntax documentation in B01cd is wrong?
  2015-11-23 15:26 ` Peter Stephenson
@ 2015-11-23 17:12   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2015-11-23 17:12 UTC (permalink / raw)
  To: zsh-workers

On Nov 23,  3:26pm, Peter Stephenson wrote:
} Subject: Re: Test syntax documentation in B01cd is wrong?
}
} Looks to me from the test driver that it should work on *any* line, not
} just the first.

diff --git a/Test/B01cd.ztst b/Test/B01cd.ztst
index a5b3769..94447e7 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.
 #
-# The first line (only) of a '>' and '?' chunk may be preceded by a '*',
-# so the line starts '*>' or '*?'.  This signifies that all lines in the
-# chunk (not just the one with the '*' in front) in the actual output
-# are 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.
+# 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.
 #
 # 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

-- 
Barton E. Schaefer


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-23 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-22 22:05 Test syntax documentation in B01cd is wrong? Bart Schaefer
2015-11-23 15:26 ` Peter Stephenson
2015-11-23 17:12   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).