]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t4068: add --merge-base tests
authorDenton Liu <liu.denton@gmail.com>
Sun, 20 Sep 2020 11:22:24 +0000 (04:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Sep 2020 04:30:26 +0000 (21:30 -0700)
In the future, we will be adding more --merge-base tests to this test
script. To prepare for that, rename the script accordingly and update
its description. Also, add two basic --merge-base tests that don't
require any functionality to be implemented yet.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4068-diff-symmetric-merge-base.sh [moved from t/t4068-diff-symmetric.sh with 86% similarity]

similarity index 86%
rename from t/t4068-diff-symmetric.sh
rename to t/t4068-diff-symmetric-merge-base.sh
index 60c506c2b2de2d444e89f7735cab0bcc59d25abd..bd4cf254d96de2c90b79c5ae56eb596451c2262e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='behavior of diff with symmetric-diff setups'
+test_description='behavior of diff with symmetric-diff setups and --merge-base'
 
 . ./test-lib.sh
 
@@ -88,4 +88,13 @@ test_expect_success 'diff with ranges and extra arg' '
        test_i18ngrep "usage" err
 '
 
+test_expect_success 'diff --merge-base with no commits' '
+       test_must_fail git diff --merge-base
+'
+
+test_expect_success 'diff --merge-base with three commits' '
+       test_must_fail git diff --merge-base br1 br2 master 2>err &&
+       test_i18ngrep "usage" err
+'
+
 test_done