From: John Keeping <john@keeping.me.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Antoine Pelisse <apelisse@gmail.com>
Subject: [PATCH v2] t4038: add tests for "diff --cc --raw <trees>"
Date: Tue, 5 Feb 2013 21:39:49 +0000 [thread overview]
Message-ID: <20130205213949.GY1342@serenity.lan> (raw)
In-Reply-To: <7v8v72sczp.fsf@alter.siamese.dyndns.org>
Signed-off-by: John Keeping <john@keeping.me.uk>
---
Changes since v1:
- more spaces around '|'
- create trees with line feeds and use 'sed -e 4q'
---
t/t4038-diff-combined.sh | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 40277c7..614425a 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -89,4 +89,28 @@ test_expect_success 'diagnose truncated file' '
grep "diff --cc file" out
'
+test_expect_success 'setup for --cc --raw' '
+ blob=$(echo file | git hash-object --stdin -w) &&
+ base_tree=$(echo "100644 blob $blob file" | git mktree) &&
+ trees= &&
+ for i in `test_seq 1 40`
+ do
+ blob=$(echo file$i | git hash-object --stdin -w) &&
+ trees="$trees$(echo "100644 blob $blob file" | git mktree)$LF"
+ done
+'
+
+test_expect_success 'check --cc --raw with four trees' '
+ four_trees=$(echo "$trees" | sed -e 4q) &&
+ git diff --cc --raw $four_trees $base_tree >out &&
+ # Check for four leading colons in the output:
+ grep "^::::[^:]" out
+'
+
+test_expect_success 'check --cc --raw with forty trees' '
+ git diff --cc --raw $trees $base_tree >out &&
+ # Check for forty leading colons in the output:
+ grep "^::::::::::::::::::::::::::::::::::::::::[^:]" out
+'
+
test_done
--
1.8.1.2.689.g36c777b
next prev parent reply other threads:[~2013-02-05 21:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 14:37 [PATCH 0/3] Make Git compile warning-free with Clang John Keeping
2013-02-03 14:37 ` [PATCH 1/3] fix clang -Wtautological-compare with unsigned enum John Keeping
2013-02-03 19:38 ` Jonathan Nieder
2013-02-03 14:37 ` [PATCH 2/3] combine-diff: suppress a clang warning John Keeping
2013-02-03 18:20 ` Tay Ray Chuan
2013-02-03 19:06 ` John Keeping
2013-02-03 19:58 ` Junio C Hamano
2013-02-03 20:31 ` John Keeping
2013-02-03 21:07 ` Junio C Hamano
2013-02-03 23:15 ` John Keeping
2013-02-04 0:24 ` Junio C Hamano
2013-02-05 20:25 ` [PATCH] t4038: add tests for "diff --cc --raw <trees>" John Keeping
2013-02-05 20:48 ` Junio C Hamano
2013-02-05 21:39 ` John Keeping [this message]
2013-02-05 22:27 ` [PATCH v2] " Junio C Hamano
2013-02-07 4:12 ` [PATCH 2/3] combine-diff: suppress a clang warning Miles Bader
2013-02-07 8:41 ` John Keeping
2013-02-03 14:37 ` [PATCH 3/3] builtin/apply: tighten (dis)similarity index parsing John Keeping
2013-02-03 20:50 ` Junio C Hamano
2013-02-03 17:13 ` [PATCH 0/3] Make Git compile warning-free with Clang Antoine Pelisse
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=20130205213949.GY1342@serenity.lan \
--to=john@keeping.me.uk \
--cc=apelisse@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).