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

Re: [PATCH] Fix failing test t3700-add.sh

From
Johannes Sixt <j6t@kdbg.org>
Date
Jul 29, 2016, 16:23 UTC
Message-ID
<6708d224-9a44-1446-8543-7c3c6403e506@kdbg.org>
In-Reply-To
<579b4ca1.18da2703.bm000@wupperonline.de>
Am 29.07.2016 um 14:31 schrieb Ingo Brückl:
Show 32 quoted lines
> At the time of the test xfoo1 already exists and is a link.
> As a result, the check for file mode 100644 fails.
>
> Create not yet existing file xfoo instead.
>
> Signed-off-by: Ingo Brückl <ib@wupperonline.de>
> ---
>  t/t3700-add.sh | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/t/t3700-add.sh b/t/t3700-add.sh
> index 4865304..aee61b9 100755
> --- a/t/t3700-add.sh
> +++ b/t/t3700-add.sh
> @@ -342,12 +342,12 @@ test_expect_success 'git add --chmod=+x stages a non-executable file with +x' '
>  '
>
>  test_expect_success 'git add --chmod=-x stages an executable file with -x' '
> -	echo foo >xfoo1 &&
> -	chmod 755 xfoo1 &&
> -	git add --chmod=-x xfoo1 &&
> -	case "$(git ls-files --stage xfoo1)" in
> -	100644" "*xfoo1) echo pass;;
> -	*) echo fail; git ls-files --stage xfoo1; (exit 1);;
> +	echo foo >xfoo &&
> +	chmod 755 xfoo &&
> +	git add --chmod=-x xfoo &&
> +	case "$(git ls-files --stage xfoo)" in
> +	100644" "*xfoo) echo pass;;
> +	*) echo fail; git ls-files --stage xfoo; (exit 1);;
>  	esac
>  '

The commit that added this test is already 2 months old. How could that have been missed?

In fact, I cannot verify that there is xfoo1 in the directory or in the index before this test case runs. The general statement that the commit message makes is clearly not correct. What am I missing?

-- Hannes
Previous: Ingo BrücklNext: Jeff King
Message 2 of 4 in “Fix failing test t3700-add.sh”
  1. Fix failing test t3700-add.shIngo Brückl, Jul 29, 2016
  2. Johannes SixtJul 29, 2016
  3. Jeff KingJul 29, 2016
  4. Junio C HamanoJul 29, 2016

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.