[Po4a-commits] po4a/t 03-addendums.t,1.4,1.5
Martin Quinson
po4a-devel@lists.alioth.debian.org
Sun, 15 Aug 2004 08:21:57 +0000
Update of /cvsroot/po4a/po4a/t
In directory haydn:/tmp/cvs-serv23085
Modified Files:
03-addendums.t
Log Message:
make more useful output on error
Index: 03-addendums.t
===================================================================
RCS file: /cvsroot/po4a/po4a/t/03-addendums.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- 03-addendums.t 16 Jul 2004 00:45:41 -0000 1.4
+++ 03-addendums.t 15 Aug 2004 08:21:55 -0000 1.5
@@ -11,19 +11,19 @@
mkdir "t/tmp" unless -e "t/tmp";
$tests[0]{'run'} = 'perl ../po4a-translate -f man -a data-03/man.addendum1 -m data-03/man -p data-03/man.po-ok -l tmp/man.fr';
-$tests[0]{'test'} = 'diff -u data-03/man.fr.add1 tmp/man.fr';
+$tests[0]{'test'} = 'diff -u50 data-03/man.fr.add1 tmp/man.fr';
$tests[0]{'doc'} = 'translate with addendum1';
$tests[1]{'run'} = 'perl ../po4a-translate -f man -a data-03/man.addendum2 -m data-03/man -p data-03/man.po-ok -l tmp/man.fr';
-$tests[1]{'test'} = 'diff -u data-03/man.fr.add2 tmp/man.fr';
+$tests[1]{'test'} = 'diff -u50 data-03/man.fr.add2 tmp/man.fr';
$tests[1]{'doc'} = 'translate with addendum2';
$tests[2]{'run'} = 'perl ../po4a-translate -f man -a data-03/man.addendum3 -m data-03/man -p data-03/man.po-ok -l tmp/man.fr';
-$tests[2]{'test'} = 'diff -u data-03/man.fr.add3 tmp/man.fr';
+$tests[2]{'test'} = 'diff -u50 data-03/man.fr.add3 tmp/man.fr';
$tests[2]{'doc'} = 'translate with addendum3';
$tests[3]{'run'} = 'perl ../po4a-translate -f man -a data-03/man.addendum4 -m data-03/man -p data-03/man.po-ok -l tmp/man.fr';
-$tests[3]{'test'} = 'diff -u data-03/man.fr.add4 tmp/man.fr';
+$tests[3]{'test'} = 'diff -u50 data-03/man.fr.add4 tmp/man.fr';
$tests[3]{'doc'} = 'translate with addendum4';
@@ -48,10 +48,14 @@
$name=$tests[$i]{'doc'}.' returns what is expected';
ok($val == 0,$name);
unless ($val == 0) {
+ my $add = $tests[$i]{'run'};
+ $add =~ s/.*-a (\S*) .*/$1/;
+ $add = `cat $add | head -n 1`;
diag ("Failed (retval=$val) on:");
diag ($tests[$i]{'test'});
diag ("Was created with:");
diag ($tests[$i]{'run'});
+ diag ("Header was: $add");
}
}