[gnumeric] tests: survive non-compressed .gnumeric
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] tests: survive non-compressed .gnumeric
- Date: Sun, 11 Mar 2012 14:43:07 +0000 (UTC)
commit bbe349735a330ea05262ad58bacb7944e12c8ddd
Author: Morten Welinder <terra gnome org>
Date: Sun Mar 11 10:42:00 2012 -0400
tests: survive non-compressed .gnumeric
ChangeLog | 5 +++++
test/GnumericTest.pm | 10 +++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a89e677..78018d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-11 Morten Welinder <mwelinder gmail com>
+
+ * test/GnumericTest.pm (test_importer): Survive non-compressed
+ .gnumeric files.
+
2012-03-10 Morten Welinder <terra gnome org>
* src/sstest.c (test_random): Use more samples for normal tests to
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index e12f5ba..2a3434e 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -259,7 +259,7 @@ sub test_importer {
my $code = system ("$ssconvert '$file' '$tmp' 2>&1 | sed -e 's/^/| /'");
&system_failure ($ssconvert, $code) if $code;
- my $htxt = `gzip -dc '$tmp' | $PERL normalize-gnumeric | sha1sum`;
+ my $htxt = `zcat -f '$tmp' | $PERL normalize-gnumeric | sha1sum`;
my $newsha1 = lc substr ($htxt, 0, 40);
die "SHA-1 failure\n" unless $newsha1 =~ /^[0-9a-f]{40}$/;
@@ -280,13 +280,13 @@ sub test_importer {
my $tmp1 = "$tmp-old";
&junkfile ($tmp1);
- my $code1 = system ("gzip -dc '$saved' >'$tmp1'");
- &system_failure ('gzip', $code1) if $code1;
+ my $code1 = system ("zcat -f '$saved' >'$tmp1'");
+ &system_failure ('zcat', $code1) if $code1;
my $tmp2 = "$tmp-new";
&junkfile ($tmp2);
- my $code2 = system ("gzip -dc '$tmp' >'$tmp2'");
- &system_failure ('gzip', $code2) if $code2;
+ my $code2 = system ("zcat -f '$tmp' >'$tmp2'");
+ &system_failure ('zcat', $code2) if $code2;
my $code3 = system ('diff', @ARGV, $tmp1, $tmp2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]