Code

merge-base-many: add trivial tests based on the documentation
[git.git] / t / t3502-cherry-pick-merge.sh
index 3274c6141bceac3f6d8bf871c3e380818f9fab16..0ab52da902c8d602e9c4d64660aa4a7e8e35544f 100755 (executable)
@@ -35,8 +35,8 @@ 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 &&
-       git diff --exit-code a
+       test_must_fail git cherry-pick -m 1 b &&
+       git diff --exit-code a --
 
 '
 
@@ -44,8 +44,8 @@ test_expect_success 'cherry pick a merge without -m should fail' '
 
        git reset --hard &&
        git checkout a^0 &&
-       ! git cherry-pick c &&
-       git diff --exit-code a
+       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
 
 '
@@ -98,7 +98,7 @@ test_expect_success 'revert a merge (1)' '
        git reset --hard &&
        git checkout c^0 &&
        git revert -m 1 c &&
-       git diff --exit-code a
+       git diff --exit-code a --
 
 '
 
@@ -107,7 +107,7 @@ test_expect_success 'revert a merge (2)' '
        git reset --hard &&
        git checkout c^0 &&
        git revert -m 2 c &&
-       git diff --exit-code b
+       git diff --exit-code b --
 
 '
 
@@ -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
 
 '