From: Brian Gernhardt <benji@silverinsanity.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] t6013: Avoid using tac
Date: Sun, 31 Aug 2008 16:03:18 -0400 [thread overview]
Message-ID: <1220212998-90810-1-git-send-email-benji@silverinsanity.com> (raw)
Although tac is useful for testing for reversed output, it is not
available everywhere. Replace uses of tac with hand-rolled expected
files.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---
t/t6013-rev-list-reverse-parents.sh | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/t/t6013-rev-list-reverse-parents.sh b/t/t6013-rev-list-reverse-parents.sh
index d294466..f023fae 100755
--- a/t/t6013-rev-list-reverse-parents.sh
+++ b/t/t6013-rev-list-reverse-parents.sh
@@ -23,17 +23,29 @@ test_expect_success 'set up --reverse example' '
commit five
'
+cat >expected <<\EOF
+86412ffbe95da677fa145e05bcedc75d0d4e49f7
+4931c530d1fde996a29be48a97a056f13ab5e9ce 86412ffbe95da677fa145e05bcedc75d0d4e49f7
+0fcb03eaefb4569dea16195a244d95523cff4934 86412ffbe95da677fa145e05bcedc75d0d4e49f7
+524efe5b12a180964d586b6c47314ea015a98614 4931c530d1fde996a29be48a97a056f13ab5e9ce 0fcb03eaefb4569dea16195a244d95523cff4934
+2ed4a763ad375916b4f0fc34ed08f5843299ded6 524efe5b12a180964d586b6c47314ea015a98614
+EOF
+
test_expect_success '--reverse --parents --full-history combines correctly' '
- git rev-list --parents --full-history master -- foo |
- tac > expected &&
git rev-list --reverse --parents --full-history master -- foo \
> actual &&
test_cmp actual expected
'
+cat >expected <<\EOF
+-86412ffbe95da677fa145e05bcedc75d0d4e49f7
+4931c530d1fde996a29be48a97a056f13ab5e9ce 86412ffbe95da677fa145e05bcedc75d0d4e49f7
+0fcb03eaefb4569dea16195a244d95523cff4934 86412ffbe95da677fa145e05bcedc75d0d4e49f7
+524efe5b12a180964d586b6c47314ea015a98614 4931c530d1fde996a29be48a97a056f13ab5e9ce 0fcb03eaefb4569dea16195a244d95523cff4934
+2ed4a763ad375916b4f0fc34ed08f5843299ded6 524efe5b12a180964d586b6c47314ea015a98614
+EOF
+
test_expect_success '--boundary does too' '
- git rev-list --boundary --parents --full-history master ^root -- foo |
- tac > expected &&
git rev-list --boundary --reverse --parents --full-history \
master ^root -- foo > actual &&
test_cmp actual expected
--
1.6.0.1.207.g020e5
next reply other threads:[~2008-08-31 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-31 20:03 Brian Gernhardt [this message]
2008-08-31 22:31 ` [PATCH] t6013: replace use of 'tac' with equivalent Perl Thomas Rast
2008-09-01 12:56 ` Andreas Ericsson
2008-09-01 16:05 ` Brian Gernhardt
2008-09-01 16:32 ` Johannes Schindelin
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=1220212998-90810-1-git-send-email-benji@silverinsanity.com \
--to=benji@silverinsanity.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).