From: Ramsay Jones <ramsay@ramsay1•demon.co.uk>
To: Jonathan Nieder <jrnieder@gmail•com>
Cc: "Junio C Hamano" <gitster@pobox•com>,
"GIT Mailing-list" <git@vger•kernel.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail•com>
Subject: Re: [RFC/PATCH] t3300-*.sh: Fix a TAP parse error
Date: Sat, 28 Jul 2012 19:03:17 +0100 [thread overview]
Message-ID: <50142965.4020801@ramsay1.demon.co.uk> (raw)
In-Reply-To: <20120725205120.GD4732@burratino>
Jonathan Nieder wrote:
> [...]
>> [1] For example, what should/will happen if someone uses test_must_fail,
>> test_might_fail, etc., within the test_fixture script? Should they simply
>> be banned within a text_fixture?
>
> Why wouldn't they act just like they do in test_expect_success blocks?
Heh, well they do indeed act just like they do in text_expect_success blocks!
I spent only about 20 minutes writing test_fixture, playing with it, and then
deciding to shelve it for now. Again, I wanted a *quick* fix for the TAP
parse error, so that it would make it into v1.7.12. :(
Having now spent a further 30 minutes, I can see that I did a better job than
I thought! :-P
Actually, scratch that; rather I should say that Junio and the other authors
of the test infrastructure did such a good job (particularly with separation
of concerns), that I lucked into a good implementation.
I still haven't done any serious testing, so if I subsequently find any
problems, then the lousy implementation is my fault! ;-)
> FWIW I find Junio's test_setup name more self-explanatory. What
> mnemonic should I be using to remember the _fixture name?
I don't have a problem with 'test_setup' either; test-fixture comes from the
various xUnit unit-test libraries. (I think Kent Beck et.al. wrote JUnit first
and then it was ported to various other languages. eg cppUnit for C++).
Briefly, a test-fixture provides a context or common environment, via code for
test setup and teardown, in which to run one or more tests.
HTH
ATB,
Ramsay Jones
next prev parent reply other threads:[~2012-07-28 18:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 17:46 [RFC/PATCH] t3300-*.sh: Fix a TAP parse error Ramsay Jones
2012-07-21 18:20 ` Jonathan Nieder
2012-07-24 18:34 ` Ramsay Jones
2012-07-24 19:21 ` Jonathan Nieder
2012-07-25 18:36 ` Ramsay Jones
2012-07-24 19:57 ` Junio C Hamano
2012-07-25 19:07 ` Ramsay Jones
2012-07-25 20:51 ` Jonathan Nieder
2012-07-25 22:08 ` Junio C Hamano
2012-07-28 18:12 ` Ramsay Jones
2012-07-28 18:03 ` Ramsay Jones [this message]
2012-08-16 23:40 ` Junio C Hamano
2012-08-19 17:57 ` Ramsay Jones
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=50142965.4020801@ramsay1.demon.co.uk \
--to=ramsay@ramsay1$(echo .)demon.co.uk \
--cc=avarab@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=jrnieder@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox