Skip to contentSkip to conversation

Fix annotate test script; notice when git-annotate fails.

PATCH In review Ramsay Jones 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 2/10 Fix annotate test script; notice when git-annotate fails.

The t8001-annotate.sh test claimed all tests pass, when in fact the git-annotate perl script failed to run! (prior to fixing the script to work with perl 5.5).

---
 t/annotate-tests.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
t/annotate-tests.sh +2 -1
index 1148b02..077b4a5 100644
@@ -4,7 +4,8 @@ # sourced from t8001-annotate.sh and t80
 check_count () {
 	head=
 	case "$1" in -h) head="$2"; shift; shift ;; esac
-	$PROG file $head | perl -e '
+	$PROG file $head >.result || return 1
+	cat .result | perl -e '
 		my %expect = (@ARGV);
 		my %count = ();
 		while (<STDIN>) {
Signature · 1 line
1.4.1

From b0c4383bf48d10bbd5229b51ad5d9230568add2c Mon Sep 17 00:00:00 2001
From: Ramsay Allan Jones <[email protected]>
Date: Sat, 29 Jul 2006 17:20:41 +0100
Subject: [PATCH 2/10] Fix annotate test script; notice when git-annotate fails.

The t8001-annotate.sh test claimed all tests pass, when in fact the git-annotate perl script failed to run! (prior to fixing the script to work with perl 5.5).

---
 t/annotate-tests.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
t/annotate-tests.sh +2 -1
index 1148b02..077b4a5 100644
@@ -4,7 +4,8 @@ # sourced from t8001-annotate.sh and t80
 check_count () {
 	head=
 	case "$1" in -h) head="$2"; shift; shift ;; esac
-	$PROG file $head | perl -e '
+	$PROG file $head >.result || return 1
+	cat .result | perl -e '
 		my %expect = (@ARGV);
 		my %count = ();
 		while (<STDIN>) {
Signature · 1 line
1.4.1