[gnumeric] Tests: debug improvements for --verbose.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Tests: debug improvements for --verbose.
- Date: Wed, 26 Feb 2014 00:44:05 +0000 (UTC)
commit 36008c71c0fade209ddbb45352b12e242aad35a0
Author: Morten Welinder <terra gnome org>
Date: Tue Feb 25 19:39:22 2014 -0500
Tests: debug improvements for --verbose.
test/GnumericTest.pm | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index 4c6d243..e3f319c 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -379,22 +379,30 @@ sub test_roundtrip {
if ($resize) {
$file_resized =~ s{^.*/}{};
$file_resized =~ s/(\.gnumeric)$/-resize$1/;
- print STDERR "$ssconvert --resize $resize '$file' '$file_resized' 2>&1 | sed -e 's/^/| /'\n" if
$verbose;
- $code = system ("$ssconvert --resize $resize '$file' '$file_resized' 2>&1 | sed -e 's/^/| /'");
+ my $cmd = "$ssconvert --resize $resize '$file' '$file_resized'";
+ print STDERR "# $cmd\n" if $verbose;
+ $code = system ("$cmd 2>&1 | sed -e 's/^/| /'");
&system_failure ($ssconvert, $code) if $code;
&junkfile ($file_resized) unless $keep;
}
-
+
my $tmp1 = "$tmp.$newext";
&junkfile ($tmp1) unless $keep;
- print "$ssconvert -T $format '$file_resized' '$tmp1' 2>&1 | sed -e 's/^/| /'\n" if $verbose;
- $code = system ("$ssconvert -T $format '$file_resized' '$tmp1' 2>&1 | sed -e 's/^/| /'");
- &system_failure ($ssconvert, $code) if $code;
+ {
+ my $cmd = "$ssconvert -T $format '$file_resized' '$tmp1'";
+ print "# $cmd\n" if $verbose;
+ my $code = system ("$cmd 2>&1 | sed -e 's/^/| /'");
+ &system_failure ($ssconvert, $code) if $code;
+ }
my $tmp2 = "$tmp-new.$ext";
&junkfile ($tmp2) unless $keep;
- $code = system ("$ssconvert '$tmp1' '$tmp2' 2>&1 | sed -e 's/^/| /'");
- &system_failure ($ssconvert, $code) if $code;
+ {
+ my $cmd = "$ssconvert '$tmp1' '$tmp2'";
+ print "# $cmd\n" if $verbose;
+ my $code = system ("$cmd 2>&1 | sed -e 's/^/| /'");
+ &system_failure ($ssconvert, $code) if $code;
+ }
my $tmp_xml = "$tmp.xml";
&junkfile ($tmp_xml) unless $keep;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]