git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t9400: Add some tests for checkout

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 4, 2007, 18:24 UTC
Message-ID
<Pine.LNX.4.64.0710041921490.4174@racer.site>
In-Reply-To
<1191521625-2597-1-git-send-email-frank@lichtenheld.de>
Hi,
On Thu, 4 Oct 2007, Frank Lichtenheld wrote:
Show 8 quoted lines
> +# 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?
Show 14 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" ?
> +   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.

Ciao, Dscho

Previous: Frank LichtenheldNext: Frank Lichtenheld
Message 2 of 5 in “t9400: Add some tests for checkout”
  1. t9400: Add some tests for checkoutFrank Lichtenheld, Oct 4, 2007
  2. Johannes SchindelinOct 4, 2007
  3. Frank LichtenheldOct 4, 2007
  4. Johannes SchindelinOct 4, 2007
  5. Frank LichtenheldOct 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.