List for cgit developers and users
 help / color / mirror / Atom feed
From: cgit at cryptocrack.de (Lukas Fleischer)
Subject: [PATCH 4/5] t0108: Compare output with git-format-patch(1)
Date: Mon, 26 Aug 2013 20:38:34 +0200	[thread overview]
Message-ID: <1377542315-19728-5-git-send-email-cgit@cryptocrack.de> (raw)
In-Reply-To: <1377542315-19728-1-git-send-email-cgit@cryptocrack.de>

Signed-off-by: Lukas Fleischer <cgit at cryptocrack.de>
---
 tests/t0108-patch.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh
index 33675af..0a2ec2e 100755
--- a/tests/t0108-patch.sh
+++ b/tests/t0108-patch.sh
@@ -23,6 +23,13 @@ test_expect_success 'find `cgit` signature' '
 	tail -2 tmp | head -1 | grep "^cgit"
 '
 
+test_expect_success 'compare with output of git-format-patch(1)' '
+	CGIT_VERSION=$(sed -n "s/CGIT_VERSION = //p" ../../VERSION)
+	git --git-dir="$PWD/repos/foo/.git" format-patch -p --subject-prefix="" --signature="cgit $CGIT_VERSION" --stdout HEAD^ >tmp2
+	sed "1,5d" tmp >tmp_
+	cmp tmp_ tmp2
+'
+
 test_expect_success 'find initial commit' '
 	root=$(git --git-dir="$PWD/repos/foo/.git" rev-list --max-parents=0 HEAD)
 '
-- 
1.8.4.rc3.500.gc3113b0



  parent reply	other threads:[~2013-08-26 18:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 18:38 [PATCH 0/5] Several ui-patch.c tweaks and tests! cgit
2013-08-26 18:38 ` [PATCH 1/5] t0108: Avoid unnecessary fork() cgit
2013-08-26 18:38 ` [PATCH 2/5] ui-patch.c: Fix signature delimiter cgit
2013-08-26 18:38 ` [PATCH 3/5] ui-patch.c: Add additional newline after each patch cgit
2013-08-26 18:38 ` cgit [this message]
2013-08-26 18:38 ` [PATCH 5/5] t0108: Add tests for revision ranges cgit
2013-08-26 19:05 ` [PATCH 0/5] Several ui-patch.c tweaks and tests! Jason

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=1377542315-19728-5-git-send-email-cgit@cryptocrack.de \
    --to=cgit@lists.zx2c4.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).