git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rewrite t1500-rev-parse.sh
@ 2016-04-09 11:19 Michael Rappazzo
  2016-04-09 11:19 ` [PATCH] t1500-rev-parse: rewrite each test to run in isolation Michael Rappazzo
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Rappazzo @ 2016-04-09 11:19 UTC (permalink / raw)
  To: git; +Cc: gitster, sunshine, pclouds, szeder, Michael Rappazzo

I was working on a simple bug fix[1], and I wanted to add a test to t1500.  I put
the new test at the beginning rather than try to decipher what state the test run
would be in at the end. In the review, Eric Sunshine described the test:

> this script is ancient and cd's all around the place with wild abandon and
> leaks environment variables

I decided to rewrite this test in (what I hope is) the modern test format.  In
doing so, I expanded the size of the test file greatly, but I think it is much
clearer to read and understand as you go through it.  This also has the advantage
of allowing a tester to use verbose options when testing.  As noted in the commit
comment, tests which compare text (rather than booleans) were also adjusted to use
the test_cmp function.

This patch is based on 'pu' because of a feature to add `--absolute-git-dir` to
rev-parse[2].

I considered including this patch as the first commit in the aforementioned bug
fix, but I wanted to get it out for review to make sure that it is acceptible.


[1]http://thread.gmane.org/gmane.comp.version-control.git/290669
[2]http://article.gmane.org/gmane.comp.version-control.git/287462

Michael Rappazzo (1):
  t1500-rev-parse: rewrite each test to run in isolation

 t/t1500-rev-parse.sh | 607 +++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 545 insertions(+), 62 deletions(-)

-- 
2.8.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-16 10:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-09 11:19 [PATCH] rewrite t1500-rev-parse.sh Michael Rappazzo
2016-04-09 11:19 ` [PATCH] t1500-rev-parse: rewrite each test to run in isolation Michael Rappazzo
2016-04-13  2:03   ` Junio C Hamano
2016-04-16 10:23     ` SZEDER Gábor
2016-04-13  4:54   ` Eric Sunshine
2016-04-13 12:21     ` Mike Rappazzo
2016-04-13 18:29     ` Jeff King

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).