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

Re: [PATCH] test-lib-functions: make 'test_cmp_rev' more informative on failure

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Nov 19, 2018, 13:31 UTC
Message-ID
<20181119133102.GS30222@szeder.dev>
In-Reply-To
<20181119132818.3116-1-szeder.dev@gmail.com>
On Mon, Nov 19, 2018 at 02:28:18PM +0100, SZEDER Gábor wrote:
Show 14 quoted lines
> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
> index d158c8d0bf..fc84db67a1 100644
> --- a/t/test-lib-functions.sh
> +++ b/t/test-lib-functions.sh
> @@ -854,9 +854,23 @@ test_must_be_empty () {
>  
>  # Tests that its two parameters refer to the same revision
>  test_cmp_rev () {
> -	git rev-parse --verify "$1" >expect.rev &&
> -	git rev-parse --verify "$2" >actual.rev &&
> -	test_cmp expect.rev actual.rev
> +	if test $# != 2
> +	then
> +		error "bug in the test script: test_cmp_rev requires two revisions, but got $#"

And this here is another "bug in the test script" error that should be turned into:

  BUG "test_cmp_rev requires two revisions, but got $#"
See: https://public-inbox.org/git/20181119131326.2435-1-szeder.dev@gmail.com/
Previous: SZEDER GáborNext: Jeff King
Message 2 of 5 in “test-lib-functions: make 'test_cmp_rev' more informative on failure”
  1. test-lib-functions: make 'test_cmp_rev' more informative on failureSZEDER Gábor, Nov 19, 2018
  2. SZEDER GáborNov 19, 2018
  3. Jeff KingNov 19, 2018
  4. SZEDER GáborNov 20, 2018
  5. Jeff KingNov 20, 2018

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.