t7419: change test_must_fail to ! for grep
According to t/README, test_must_fail() should only be used to test for failure in Git commands. Replace the invocations of `test_must_fail grep` with `! grep`. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Oct 22, 2019 at 02:57 UTC
a8e2c0eadc1a7abe7afdd138a6536dbf402e3c60
1 file changed
+3
-3
t/t7419-submodule-set-branch.sh
+3
-3
@@ -34,7 +34,7 @@ test_expect_success 'submodule config cache setup' '
34
35
test_expect_success 'ensure submodule branch is unset' '
36
(cd super &&
37
- test_must_fail grep branch .gitmodules
37
+ ! grep branch .gitmodules
38
)
39
'
40
@@ -54,7 +54,7 @@ test_expect_success 'test submodule set-branch --branch' '
54
test_expect_success 'test submodule set-branch --default' '
55
(cd super &&
56
git submodule set-branch --default submodule &&
57
- test_must_fail grep branch .gitmodules &&
57
+ ! grep branch .gitmodules &&
58
git submodule update --remote &&
59
cat <<-\EOF >expect &&
60
a
@@ -80,7 +80,7 @@ test_expect_success 'test submodule set-branch -b' '
80
test_expect_success 'test submodule set-branch -d' '
81
(cd super &&
82
git submodule set-branch -d submodule &&
83
- test_must_fail grep branch .gitmodules &&
83
+ ! grep branch .gitmodules &&
84
git submodule update --remote &&
85
cat <<-\EOF >expect &&
86
a