[gnumeric] tests: aggressively remove old roundtrip files.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] tests: aggressively remove old roundtrip files.
- Date: Mon, 10 Mar 2014 18:05:21 +0000 (UTC)
commit 879898fc532b600fd3df677d7d808b62b8fd6cca
Author: Morten Welinder <terra gnome org>
Date: Mon Mar 10 14:04:41 2014 -0400
tests: aggressively remove old roundtrip files.
Otherwise a crash in the converter looks very strange.
test/GnumericTest.pm | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index 662b470..a6e9f68 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -399,6 +399,7 @@ sub test_roundtrip {
if ($resize) {
$file_resized =~ s{^.*/}{};
$file_resized =~ s/(\.gnumeric)$/-resize$1/;
+ unlink $file_resized;
my $cmd = "$ssconvert --resize $resize '$file' '$file_resized'";
print STDERR "# $cmd\n" if $verbose;
$code = system ("$cmd 2>&1 | sed -e 's/^/| /'");
@@ -407,6 +408,7 @@ sub test_roundtrip {
}
my $tmp1 = "$tmp.$newext";
+ unlink $tmp1;
&junkfile ($tmp1) unless $keep;
{
my $cmd = "$ssconvert -T $format '$file_resized' '$tmp1'";
@@ -416,6 +418,7 @@ sub test_roundtrip {
}
my $tmp2 = "$tmp-new.$ext";
+ unlink $tmp2;
&junkfile ($tmp2) unless $keep;
{
my $cmd = "$ssconvert '$tmp1' '$tmp2'";
@@ -425,11 +428,13 @@ sub test_roundtrip {
}
my $tmp_xml = "$tmp.xml";
+ unlink $tmp_xml;
&junkfile ($tmp_xml) unless $keep;
$code = system ("zcat -f '$file_resized' | $normalize_gnumeric | $filter1 >'$tmp_xml'");
&system_failure ('zcat', $code) if $code;
my $tmp2_xml = "$tmp-new.xml";
+ unlink $tmp2_xml;
&junkfile ($tmp2_xml) unless $keep;
# print STDERR "zcat -f '$tmp2' | $normalize_gnumeric | $filter2 >'$tmp2_xml'\n";
$code = system ("zcat -f '$tmp2' | $normalize_gnumeric | $filter2 >'$tmp2_xml'");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]