summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFelipe Gonçalves Assis <felipeg.assis@gmail.com>2016-02-24 01:41:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-24 22:48:55 (GMT)
commit44c74ecade186d7c7047642840d581709db3ba23 (patch)
tree74a051ff5c0657a6a0df1dfb6743fc2725bc0d85 /t
parent2307211349e6fe83e3574c2e1a03bb34c24ed1b9 (diff)
downloadgit-44c74ecade186d7c7047642840d581709db3ba23.zip
git-44c74ecade186d7c7047642840d581709db3ba23.tar.gz
git-44c74ecade186d7c7047642840d581709db3ba23.tar.bz2
t3034: test deprecated interface
--find-renames= and --rename-threshold= should be aliases. Signed-off-by: Felipe Gonçalves Assis <felipegassis@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3034-merge-recursive-rename-options.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/t/t3034-merge-recursive-rename-options.sh b/t/t3034-merge-recursive-rename-options.sh
index 2479910..b9c4028 100755
--- a/t/t3034-merge-recursive-rename-options.sh
+++ b/t/t3034-merge-recursive-rename-options.sh
@@ -263,4 +263,50 @@ test_expect_success '--find-renames rejects non-numbers' '
git diff --quiet --cached
'
+test_expect_success 'rename-threshold=<n> is a synonym for find-renames=<n>' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git merge-recursive --rename-threshold=$th0 $tail &&
+ check_threshold_0
+'
+
+test_expect_success 'last wins in --no-renames --rename-threshold=<n>' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git merge-recursive --no-renames --rename-threshold=$th0 $tail &&
+ check_threshold_0
+'
+
+test_expect_success 'last wins in --rename-threshold=<n> --no-renames' '
+ git read-tree --reset -u HEAD &&
+ git merge-recursive --rename-threshold=$th0 --no-renames $tail &&
+ check_no_renames
+'
+
+test_expect_success '--rename-threshold=<n> rejects negative argument' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git merge-recursive --rename-threshold=-25 \
+ HEAD -- HEAD HEAD &&
+ git diff --quiet --cached
+'
+
+test_expect_success '--rename-threshold=<n> rejects non-numbers' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git merge-recursive --rename-threshold=0xf \
+ HEAD -- HEAD HEAD &&
+ git diff --quiet --cached
+'
+
+test_expect_success 'last wins in --rename-threshold=<m> --find-renames=<n>' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git merge-recursive \
+ --rename-threshold=$th0 --find-renames=$th2 $tail &&
+ check_threshold_2
+'
+
+test_expect_success 'last wins in --find-renames=<m> --rename-threshold=<n>' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git merge-recursive \
+ --find-renames=$th2 --rename-threshold=$th0 $tail &&
+ check_threshold_0
+'
+
test_done