From d492b31cafe9aa5ce001b1d48815f4c0bb40d01a Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sat, 12 Jul 2008 17:47:52 +0200 Subject: t/: Use "test_must_fail git" instead of "! git" This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- t/t3502-cherry-pick-merge.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 't/t3502-cherry-pick-merge.sh') diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh index 7c92e261fc..0ab52da902 100755 --- a/t/t3502-cherry-pick-merge.sh +++ b/t/t3502-cherry-pick-merge.sh @@ -35,7 +35,7 @@ test_expect_success 'cherry-pick a non-merge with -m should fail' ' git reset --hard && git checkout a^0 && - ! git cherry-pick -m 1 b && + test_must_fail git cherry-pick -m 1 b && git diff --exit-code a -- ' @@ -44,7 +44,7 @@ test_expect_success 'cherry pick a merge without -m should fail' ' git reset --hard && git checkout a^0 && - ! git cherry-pick c && + test_must_fail git cherry-pick c && git diff --exit-code a -- ' @@ -71,7 +71,7 @@ test_expect_success 'cherry pick a merge relative to nonexistent parent should f git reset --hard && git checkout b^0 && - ! git cherry-pick -m 3 c + test_must_fail git cherry-pick -m 3 c ' @@ -79,7 +79,7 @@ test_expect_success 'revert a non-merge with -m should fail' ' git reset --hard && git checkout c^0 && - ! git revert -m 1 b && + test_must_fail git revert -m 1 b && git diff --exit-code c ' @@ -88,7 +88,7 @@ test_expect_success 'revert a merge without -m should fail' ' git reset --hard && git checkout c^0 && - ! git revert c && + test_must_fail git revert c && git diff --exit-code c ' @@ -115,7 +115,7 @@ test_expect_success 'revert a merge relative to nonexistent parent should fail' git reset --hard && git checkout c^0 && - ! git revert -m 3 c && + test_must_fail git revert -m 3 c && git diff --exit-code c ' -- cgit v1.2.3