Re: [PATCH] t9400: Add some tests for checkout
- From
Frank Lichtenheld <frank@lichtenheld.de>
- Date
- Oct 4, 2007, 19:12 UTC
- Message-ID
- <20071004191217.GC31659@planck.djpig.de>
- In-Reply-To
- <Pine.LNX.4.64.0710041921490.4174@racer.site>
On Thu, Oct 04, 2007 at 07:24:05PM +0100, Johannes Schindelin wrote:
Show 12 quoted lines
> 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".
Show 16 quoted lines
> > -#------------ > > -# 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.
Show 5 quoted lines
> > + 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/