From: Felipe Contreras <felipe.contreras@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: "make check" suggestion
Date: Sat, 28 Nov 2020 04:31:46 -0600 [thread overview]
Message-ID: <CAMP44s0UDMz=kSgpUVJ5HtU8d2_Mmnb===dMUgqAJ+mE++GfHg@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7YxWQY+WCX+SMC-R-n0u+JE1Ty9iCmEp6oyz9Ba_Xewqw@mail.gmail.com>
On Sat, Nov 28, 2020 at 12:53 AM Bart Schaefer
<schaefer@brasslantern.com> wrote:
>
> I haven't messed around with ztst.zsh for some years, so I'm not
> familiar with how the newer features like intentionally failed tests
> are handled. A suggestion perhaps for someone who has worked on it
> more recently:
>
> It might be nice to have a mode in which ALL the tests in each file
> are run, rather than abort the whole test file when one of them fails
> (or unexpectedly succeeds).
Coming from Git, I have to say their testing framework is the best
I've ever seen.
It is developed in shell. There may be some bashisms, but they try to
avoid them. Last time I tried it in zsh, it didn't work correctly, but
shouldn't be too hard to fix (and maybe it was a problem in zsh), and
I'm sure they would accept the patches.
The project that tried to extirpate the test system from git.git is
called sharness [1]. I've used it in all my projects, and it works
like a charm.
In this test system all you have to do is pass -i to the test, to stop
at a failure.
For example:
./completion-zsh.t -i
Additionally, the system supports Perl's Test Anything Protocol (TAP) [2].
So you can do:
prove completion-zsh.t :: -i
That's how I developed the git-completion zsh specific tests, which
work great, and are integrated into Travis-CI [3].
If anyone is interested, I could give it a try to port some zsh test
to sharness.
In my personal opinion the testing system of zsh is far from ideal.
But that's just my opinion.
Cheers.
[1] https://github.com/chriscool/sharness
[2] https://en.wikipedia.org/wiki/Test_Anything_Protocol
[3] https://travis-ci.org/github/felipec/git-completion
--
Felipe Contreras
next prev parent reply other threads:[~2020-11-28 10:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-28 6:52 Bart Schaefer
2020-11-28 10:31 ` Felipe Contreras [this message]
2020-12-01 17:03 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMP44s0UDMz=kSgpUVJ5HtU8d2_Mmnb===dMUgqAJ+mE++GfHg@mail.gmail.com' \
--to=felipe.contreras@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).