Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining

From: Michael Albinus <[email-masked]>
Date: Thu, 20 Jan 2022 19:41:38 +0100

Sean Whitton <[email-masked]> writes:

> Hello Michael,

Hi Sean,

> I could instead substitute the actual values of those variables into the
> expected return values.  It seems to me that would sacrifice readability
> of the tests, though.  Am I perhaps missing some other benefit?

I understand your intentions, they are OK.

However, if I understand your test cases, they check that the eshell
commands are manipulated as you expect. The tests do not run the
resulting command itself, checking the output. This is a little bit
unfortune, because you could check that the output is indeed what you
expect. And perhaps you could find some constellations, where the output
is different when using either *| or |. This would be another proof that
your changes work.

And this would also give some guidance, where your approach has
limitations (if exist). Showing also *failing* tests in one way or
another is always a benefit. Your tests use only should, there is no
should-not or should-error.

Another benefit of testing working examples and their output is
documentation. I always have trouble to understand documentation of
unknown (to me) features in Emacs. I have the attitude to run the
respective ert tests, and to study how the feature is applied by its
developer. Often, it is more instructive than documentation, and I can
steal the code.

> Many thanks for the review.

Best regards, Michael.