git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Rappazzo <rappazzo@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, sunshine@sunshineco.com, pclouds@gmail.com,
	szeder@ira.uka.de, Michael Rappazzo <rappazzo@gmail.com>
Subject: [PATCH] rewrite t1500-rev-parse.sh
Date: Sat,  9 Apr 2016 07:19:26 -0400	[thread overview]
Message-ID: <1460200767-32864-1-git-send-email-rappazzo@gmail.com> (raw)

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

             reply	other threads:[~2016-04-09 11:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 11:19 Michael Rappazzo [this message]
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

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=1460200767-32864-1-git-send-email-rappazzo@gmail.com \
    --to=rappazzo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=szeder@ira.uka.de \
    /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.
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).