diff options
author | Pranit Bauva <pranit.bauva@gmail.com> | 2017-01-04 01:27:07 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-07 13:20:01 -0800 |
commit | c7cf956618c4af9f3151a90d7552b05767e6444f (patch) | |
tree | ea074b87fcb872c13df8b0b5d2c3d2b12c5a89d6 /t/t9814-git-p4-rename.sh | |
parent | a274e0a036ea886a31f8b216564ab1b4a3142f6c (diff) | |
download | git-c7cf956618c4af9f3151a90d7552b05767e6444f.tar.gz |
don't use test_must_fail with grep
test_must_fail should only be used for testing git commands. To test the
failure of other commands use `!`.
Reported-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9814-git-p4-rename.sh')
-rwxr-xr-x | t/t9814-git-p4-rename.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh index c89992cf95..e7e0268e98 100755 --- a/t/t9814-git-p4-rename.sh +++ b/t/t9814-git-p4-rename.sh @@ -141,7 +141,7 @@ test_expect_success 'detect copies' ' git diff-tree -r -C HEAD && git p4 submit && p4 filelog //depot/file8 && - p4 filelog //depot/file8 | test_must_fail grep -q "branch from" && + ! p4 filelog //depot/file8 | grep -q "branch from" && echo "file9" >>file2 && git commit -a -m "Differentiate file2" && @@ -154,7 +154,7 @@ test_expect_success 'detect copies' ' git config git-p4.detectCopies true && git p4 submit && p4 filelog //depot/file9 && - p4 filelog //depot/file9 | test_must_fail grep -q "branch from" && + ! p4 filelog //depot/file9 | grep -q "branch from" && echo "file10" >>file2 && git commit -a -m "Differentiate file2" && @@ -202,7 +202,7 @@ test_expect_success 'detect copies' ' git config git-p4.detectCopies $(($level + 2)) && git p4 submit && p4 filelog //depot/file12 && - p4 filelog //depot/file12 | test_must_fail grep -q "branch from" && + ! p4 filelog //depot/file12 | grep -q "branch from" && echo "file13" >>file2 && git commit -a -m "Differentiate file2" && |