From: Frank Lichtenheld <frank@lichtenheld.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Git Mailing List <git@vger.kernel.org>, Junio C Hamano <junkio@cox.net>
Subject: Re: [PATCH] t9400: Add some tests for checkout
Date: Thu, 4 Oct 2007 21:12:17 +0200 [thread overview]
Message-ID: <20071004191217.GC31659@planck.djpig.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0710041921490.4174@racer.site>
On Thu, Oct 04, 2007 at 07:24:05PM +0100, Johannes Schindelin wrote:
> On Thu, 4 Oct 2007, Frank Lichtenheld wrote:
>
> > +# clean up
> > +rm -fr cvswork2
> > +rm -fr "$SERVERDIR"
> > +cd "$WORKDIR" &&
> > +git clone -q --local --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 &&
> > +GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&
> > +GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" ||
> > +exit 1
>
> Should this not be in a test_expect_success, too?
Since I do this several times and since it is easier to see what tests
it belongs to if it isn't buried in one of them, I would say "no".
> > -#------------
> > -# CVS UPDATE
> > -#------------
> > +#--------------
> > +# CVS CHECKOUT
> > +#--------------
> > +test_expect_success 'cvs checkout failure (HEAD)' \
> > + 'if GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 HEAD >cvs.log 2>&1
> > + then
> > + echo unexpected cvs success
> > + false
> > + else
> > + true
> > + fi &&
>
> How about "! GIT_CONFIG..." instead of the "if..then..else..fi" ?
I don't really care. IIRC I took the idiom from another testfile.
Several other tests in this file already use it, too. So unless
Junio prefers I change all occourences, I will not.
> > + cat cvs.log | grep -q "not a branch" &&
> > + test ! -d cvswork2'
> > +rm -fr cvswork2
>
> Again, for consistency, I'd include this in the test case.
Again, I don't really care. But for consistency with the rest of the
file I will only change it if I'm asked to change all occourences.
Gruesse,
--
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
next prev parent reply other threads:[~2007-10-04 19:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-04 18:13 [PATCH] t9400: Add some tests for checkout Frank Lichtenheld
2007-10-04 18:24 ` Johannes Schindelin
2007-10-04 19:12 ` Frank Lichtenheld [this message]
2007-10-04 19:17 ` Johannes Schindelin
2007-10-04 19:25 ` Frank Lichtenheld
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=20071004191217.GC31659@planck.djpig.de \
--to=frank@lichtenheld.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).