Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH 2/3] Tests for named references



Bart Schaefer wrote on Mon, Feb 06, 2023 at 19:24:52 -0800:
> On Mon, Feb 6, 2023 at 4:36 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > Also, in 1/3 you wrote "attempting to add an attribute to a named
> > reference generates a warning", but I don't see a single test expecting
> > a non-empty stderr?
> 
> Not sure what you mean here, there are lots of tests that expect a
> zero exit status and check output only on stdout.  The fifth test
> specifically attempts adding the "tag" attribute to a named reference
> and looks for the expected warning.

Sorry, my bad.  I grepped for lines that start with '?' forgot about the
possibility to prepend a '*' to that.  The fifth test is indeed what I
was looking for (and didn't find).

> In a number of cases I'm checking
> that the state of variables has been restored to the expected state by
> looking for both correct stdout of the earlier steps and "no such
> variable" after the test is done, the intent being to catch any cases
> where the nameref goes too far up the stack of scopes.

👍

Cheers,

Daniel




Messages sorted by: Reverse Date, Date, Thread, Author