Re: Test t2028 failes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 03.04.2018 um 10:16 schrieb Eric Sunshine:
On Tue, Apr 3, 2018 at 4:01 AM, Jens Krüger <Jens.Krueger@xxxxxxxxxxx> wrote:
The actual2 file does not exists, if I call the ./t2028-worktree-move.sh
with the '-v -i' options, only without any option or with '-v' option.

The content of the various files looks correct, and absence of
"actual2" implies that one of the grep's failed, which is very odd
considering that "out" has the expected content.

Using the "out" file you attached, can you show the output of these commands?

     grep "^worktree.*/destination" out
     echo $?
     grep "^worktree.*/source" out
     echo $?

I'd expect the first $? to report 0 and the second 1 in a working installation.

Also, are you using an unusual 'grep'? What does "command -v grep" report?


Maybe, the attached patch may help. On my machine(s) it helped.
diff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh
index 5d5b3632ba..65c7311865 100755
--- a/t/t2028-worktree-move.sh
+++ b/t/t2028-worktree-move.sh
@@ -77,7 +77,7 @@ test_expect_success 'move worktree' '
 	test_path_is_missing source &&
 	git worktree list --porcelain >out &&
 	grep "^worktree.*/destination" out &&
-	! grep "^worktree.*/source" out &&
+	! grep "^worktree.*/source$" out &&
 	git -C destination log --format=%s >actual2 &&
 	echo init >expected2 &&
 	test_cmp expected2 actual2

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux