git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] t3300-*.sh: Fix a TAP parse error

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jul 28, 2012, 18:03 UTC
Message-ID
<50142965.4020801@ramsay1.demon.co.uk>
In-Reply-To
<20120725205120.GD4732@burratino>
Jonathan Nieder wrote:
Show 6 quoted lines
> [...]
>> [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

Previous: Ramsay JonesNext: Junio C Hamano
Message 11 of 13 in “t3300-*.sh: Fix a TAP parse error”
  1. t3300-*.sh: Fix a TAP parse errorRamsay Jones, Jul 21, 2012
  2. Jonathan NiederJul 21, 2012
  3. Ramsay JonesJul 24, 2012
  4. Jonathan NiederJul 24, 2012
  5. Ramsay JonesJul 25, 2012
  6. Junio C HamanoJul 24, 2012
  7. Ramsay JonesJul 25, 2012
  8. Jonathan NiederJul 25, 2012
  9. Junio C HamanoJul 25, 2012
  10. Ramsay JonesJul 28, 2012
  11. Ramsay JonesJul 28, 2012
  12. Junio C HamanoAug 16, 2012
  13. Ramsay JonesAug 19, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.