Skip to content

Commit a8e2c0e

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 40e747e commit a8e2c0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t7419-submodule-set-branch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test_expect_success 'submodule config cache setup' '
3434

3535
test_expect_success 'ensure submodule branch is unset' '
3636
(cd super &&
37-
test_must_fail grep branch .gitmodules
37+
! grep branch .gitmodules
3838
)
3939
'
4040

@@ -54,7 +54,7 @@ test_expect_success 'test submodule set-branch --branch' '
5454
test_expect_success 'test submodule set-branch --default' '
5555
(cd super &&
5656
git submodule set-branch --default submodule &&
57-
test_must_fail grep branch .gitmodules &&
57+
! grep branch .gitmodules &&
5858
git submodule update --remote &&
5959
cat <<-\EOF >expect &&
6060
a
@@ -80,7 +80,7 @@ test_expect_success 'test submodule set-branch -b' '
8080
test_expect_success 'test submodule set-branch -d' '
8181
(cd super &&
8282
git submodule set-branch -d submodule &&
83-
test_must_fail grep branch .gitmodules &&
83+
! grep branch .gitmodules &&
8484
git submodule update --remote &&
8585
cat <<-\EOF >expect &&
8686
a

0 commit comments

Comments
 (0)