From: Johannes Gilger <heipei@hackvalue.de>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Gilger <heipei@hackvalue.de>
Subject: [PATCH] Test for correct behaviour on %B(1) and %B(-1)
Date: Wed, 23 Sep 2009 15:12:44 +0200 [thread overview]
Message-ID: <1253711564-17876-1-git-send-email-heipei@hackvalue.de> (raw)
In-Reply-To: <7vmy4mo85b.fsf@alter.siamese.dyndns.org>
Small test for correct indentation of the new %B tag (and whether
negative values are ignored as an incorrect placeholder).
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
---
Hi Junio,
seeing as the %B-patch is in your pu you seem to be almost happy with it. It's
marked NEEDSWORK: tests, so I thought I give that a try too. Probably best to
be squashed with the other one.
Greetings,
Jojo
t/t4202-log.sh | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 1e952ca..9b7825d 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -32,8 +32,9 @@ test_expect_success setup '
git commit -m fifth &&
git rm a/two &&
+ echo -e "sixth\n\nlineone\nlinetwo" >sixth &&
test_tick &&
- git commit -m sixth
+ git commit -F sixth
'
@@ -63,8 +64,15 @@ test_expect_success 'format' '
test_cmp expect actual
'
+printf "sixth\n\n lineone\n linetwo\n%%B(-1)\n" > expect
+test_expect_success 'format (subject %s, body %B(1), %B(-1))' '
+
+ git log --format="%s%n%n%B(1)%n%B(-1)" 394ef78..5821e35 > actual &&
+ test_cmp expect actual
+'
+
cat > expect << EOF
-804a787 sixth
+5821e35 sixth
394ef78 fifth
5d31159 fourth
2fbe8c0 third
@@ -150,22 +158,22 @@ test_expect_success 'git log --follow' '
'
cat > expect << EOF
-804a787 sixth
+5821e35 sixth
394ef78 fifth
5d31159 fourth
EOF
test_expect_success 'git log --no-walk <commits> sorts by commit time' '
- git log --no-walk --oneline 5d31159 804a787 394ef78 > actual &&
+ git log --no-walk --oneline 5d31159 5821e35 394ef78 > actual &&
test_cmp expect actual
'
cat > expect << EOF
5d31159 fourth
-804a787 sixth
+5821e35 sixth
394ef78 fifth
EOF
test_expect_success 'git show <commits> leaves list of commits as given' '
- git show --oneline -s 5d31159 804a787 394ef78 > actual &&
+ git show --oneline -s 5d31159 5821e35 394ef78 > actual &&
test_cmp expect actual
'
--
1.6.5.rc1.38.g1fbd3
next parent reply other threads:[~2009-09-23 13:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7vmy4mo85b.fsf@alter.siamese.dyndns.org>
2009-09-23 13:12 ` Johannes Gilger [this message]
2009-10-05 19:08 ` [PATCH] Test for correct behaviour on %B(1) and %B(-1) Junio C Hamano
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=1253711564-17876-1-git-send-email-heipei@hackvalue.de \
--to=heipei@hackvalue.de \
--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).