summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2020-09-20 11:22:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-21 04:30:26 (GMT)
commitdf7dbab881c1aa697f0826d8d00f73d43815acf5 (patch)
treea5417db745f58de2a85200d37fac0ab22ae76ce1
parent177a8302683da62a62b5b03e8192fcfa897db750 (diff)
downloadgit-df7dbab881c1aa697f0826d8d00f73d43815acf5.zip
git-df7dbab881c1aa697f0826d8d00f73d43815acf5.tar.gz
git-df7dbab881c1aa697f0826d8d00f73d43815acf5.tar.bz2
t4068: add --merge-base tests
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>
-rwxr-xr-xt/t4068-diff-symmetric-merge-base.sh (renamed from t/t4068-diff-symmetric.sh)11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t4068-diff-symmetric.sh b/t/t4068-diff-symmetric-merge-base.sh
index 60c506c..bd4cf25 100755
--- a/t/t4068-diff-symmetric.sh
+++ b/t/t4068-diff-symmetric-merge-base.sh
@@ -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