[gnumeric] t6502: ignore differences for patterns that xls does not have.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] t6502: ignore differences for patterns that xls does not have.
- Date: Fri, 21 Feb 2014 15:44:06 +0000 (UTC)
commit 1eec6f5203c88083f27aad38616c694b8cfc65dc
Author: Morten Welinder <terra gnome org>
Date: Fri Feb 21 10:43:36 2014 -0500
t6502: ignore differences for patterns that xls does not have.
test/GnumericTest.pm | 1 +
test/t6502-styles.pl | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index f4a8fb0..1dfe951 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -398,6 +398,7 @@ sub test_roundtrip {
my $tmp2_xml = "$tmp-new.xml";
&junkfile ($tmp2_xml) unless $keep;
+ # print STDERR "zcat -f '$tmp2' | $PERL normalize-gnumeric | $filter2 >'$tmp2_xml'\n";
$code = system ("zcat -f '$tmp2' | $PERL normalize-gnumeric | $filter2 >'$tmp2_xml'");
&system_failure ('zcat', $code) if $code;
diff --git a/test/t6502-styles.pl b/test/t6502-styles.pl
index 0a6bb83..da20d8e 100755
--- a/test/t6502-styles.pl
+++ b/test/t6502-styles.pl
@@ -20,14 +20,19 @@ my $file = "$samples/style-tests.gnumeric";
'ignore_failure' => 1);
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
+
+# Biff7 only handles a few fixed rotations.
my $xls_rotation_filter = "$PERL -p -e 's{\\b(Rotation)=\"315\"}{\$1=\"270\"};
s{\\b(Rotation)=\"45\"}{\$1=\"0\"};'";
+# Our patterns 19-24 do not exists in xls
+my $xls_pattern_filter = "$PERL -p -e 'use English; my \%m=(19,14,20,7,21,4,22,4,23,2,24,1); if
(m{\\bShade=\"(\\d+)\"} && (\$n = \$m{\$1})) { \$_ = \"\${PREMATCH}Shade=\\\"\$n\\\"\${POSTMATCH}\"; }'";
+
&message ("Check style xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
- 'filter1' => $xls_rotation_filter,
+ 'filter1' => "$xls_rotation_filter | $xls_pattern_filter",
'filter2' => $xls_codepage_filter ,
'ignore_failure' => 1);
@@ -35,6 +40,7 @@ my $xls_rotation_filter = "$PERL -p -e 's{\\b(Rotation)=\"315\"}{\$1=\"270\"}; s
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
+ 'filter1' => $xls_pattern_filter,
'filter2' => $xls_codepage_filter,
'ignore_failure' => 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]