git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Felipe Gonçalves Assis" <felipeg.assis@gmail.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de, gitster@pobox.com,
	sunshine@sunshineco.com,
	"Felipe Gonçalves Assis" <felipeg.assis@gmail.com>,
	"Felipe Gonçalves Assis" <felipegassis@gmail.com>
Subject: [PATCH 3/3] t3034: test deprecated interface
Date: Tue, 23 Feb 2016 20:48:12 -0300	[thread overview]
Message-ID: <1456271292-4652-4-git-send-email-felipegassis@gmail.com> (raw)
In-Reply-To: <1456271292-4652-1-git-send-email-felipegassis@gmail.com>

From: Felipe Gonçalves Assis <felipeg.assis@gmail.com>

--find-renames= and --rename-threshold= should be aliases.

Signed-off-by: Felipe Gonçalves Assis <felipegassis@gmail.com>
---
 t/t3034-merge-recursive-rename-options.sh | 46 +++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/t/t3034-merge-recursive-rename-options.sh b/t/t3034-merge-recursive-rename-options.sh
index c07a4cb..96d8767 100755
--- a/t/t3034-merge-recursive-rename-options.sh
+++ b/t/t3034-merge-recursive-rename-options.sh
@@ -260,4 +260,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
-- 
2.7.1.492.gd821b20

  parent reply	other threads:[~2016-02-23 23:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 23:48 [PATCH v2 0/3] Tests for merge-recursive rename options Felipe Gonçalves Assis
2016-02-23 23:48 ` [PATCH 1/3] t3034: add rename threshold tests Felipe Gonçalves Assis
2016-02-24  0:50   ` Eric Sunshine
2016-02-24  0:55     ` Eric Sunshine
2016-02-24  1:15     ` Felipe Gonçalves Assis
2016-02-23 23:48 ` [PATCH 2/3] t3034: test option to disable renames Felipe Gonçalves Assis
2016-02-23 23:48 ` Felipe Gonçalves Assis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-23  4:38 [PATCH 0/3] Tests for merge-recursive rename options Felipe Gonçalves Assis
2016-02-23  4:38 ` [PATCH 3/3] t3034: test deprecated interface Felipe Gonçalves Assis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456271292-4652-4-git-send-email-felipegassis@gmail.com \
    --to=felipeg.assis@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=felipegassis@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).