Re: [PATCH] cvsserver: Add some basic pserver tests
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 13, 2007, 18:38 UTC
- Message-ID
- <7vzm48sh5f.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <11790785662928-git-send-email-frank@lichtenheld.de>
Frank Lichtenheld <frank@lichtenheld.de> writes:
Show 17 quoted lines
> While we can easily test the cvs <-> git-cvsserver > communication with :fork: and git-cvsserver server > there are some pserver specifics we should test, too. > > Currently this are two tests of the pserver authentication. > > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> >... > +test_expect_success 'authentication' \ > + 'cat <<EOF | git-cvsserver pserver >log 2>&1 && > +BEGIN AUTH REQUEST > +$SERVERDIR > +anonymous > + > +END AUTH REQUEST > +EOF > + tail -n1 log | grep -q "^I LOVE YOU$"'
In the past, some people with non-bash shells had trouble with here text (i.e. <<HERE) inside our test scripts Either our use of eval to run the test in test_expect_success is not kosher, or their implementation of eval was slightly broken --- I do not recall if we ever dug down to the bottom of the problem. That is why most tests have here-text to prepare test vectors outside of tests themselves.