git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: git@vger.kernel.org
Cc: Brian Gernhardt <benji@silverinsanity.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] t6013: replace use of 'tac' with equivalent Perl
Date: Mon,  1 Sep 2008 00:31:37 +0200	[thread overview]
Message-ID: <1220221897-6081-1-git-send-email-trast@student.ethz.ch> (raw)
In-Reply-To: <1220212998-90810-1-git-send-email-benji@silverinsanity.com>

'tac' is not available everywhere, so substitute the equivalent Perl
code 'print reverse <>'.  Noticed by Brian Gernhardt.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---

Thanks for pointing this out.  However, I tried to avoid hardcoding
those results by recommendation of t/README (last paragraph):

  ... If all the test scripts hardcoded the object IDs like
  t0000-basic.sh does, that defeats the purpose of t0000-basic.sh,
  which is to isolate that level of validation in one place.  Your
  test also ends up needing updating when such a change to the
  internal happens, so do _not_ do it and leave the low level of
  validation to t0000-basic.sh.

So I would favour this fix.  I think this should be ok because we
depend on Perl anyway.

- Thomas


 t/t6013-rev-list-reverse-parents.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t6013-rev-list-reverse-parents.sh b/t/t6013-rev-list-reverse-parents.sh
index d294466..59fc2f0 100755
--- a/t/t6013-rev-list-reverse-parents.sh
+++ b/t/t6013-rev-list-reverse-parents.sh
@@ -25,7 +25,7 @@ test_expect_success 'set up --reverse example' '
 
 test_expect_success '--reverse --parents --full-history combines correctly' '
 	git rev-list --parents --full-history master -- foo |
-		tac > expected &&
+		perl -e "print reverse <>" > expected &&
 	git rev-list --reverse --parents --full-history master -- foo \
 		> actual &&
 	test_cmp actual expected
@@ -33,7 +33,7 @@ test_expect_success '--reverse --parents --full-history combines correctly' '
 
 test_expect_success '--boundary does too' '
 	git rev-list --boundary --parents --full-history master ^root -- foo |
-		tac > expected &&
+		perl -e "print reverse <>" > expected &&
 	git rev-list --boundary --reverse --parents --full-history \
 		master ^root -- foo > actual &&
 	test_cmp actual expected
-- 
1.6.0.1.282.g3cc57

  reply	other threads:[~2008-08-31 22:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-31 20:03 [PATCH] t6013: Avoid using tac Brian Gernhardt
2008-08-31 22:31 ` Thomas Rast [this message]
2008-09-01 12:56   ` [PATCH] t6013: replace use of 'tac' with equivalent Perl 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=1220221897-6081-1-git-send-email-trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=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).