t7406: fix call that was failing for the wrong reason
A test making use of test_must_fail was failing like this: fatal: ambiguous argument '|': unknown revision or path not in the working tree. when the intent was to verify that a specific string was not found in the output of the git diff command, i.e. that grep returned non-zero. Fix the test to do that. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Aug 8, 2018 at 09:31 UTC
0df90bdd12f57b03ac3ff7d16926c56a8f3d4682
1 file changed
+2
-1
t/t7406-submodule-update.sh
+2
-1
@@ -599,7 +599,8 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou
599
) &&
600
git diff --raw | grep " submodule" &&
601
git submodule update --checkout &&
602
- test_must_fail git diff --raw \| grep " submodule" &&
602
+ git diff --raw >out &&
603
+ ! grep " submodule" out &&
604
(cd submodule &&
605
test_must_fail compare_head
606
) &&