[gnumeric] Tests: biff7 has no diagonal borders.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Tests: biff7 has no diagonal borders.
- Date: Mon, 24 Feb 2014 21:08:24 +0000 (UTC)
commit 0e7d1300c1ecb1597efd4b979c9cf55f643e0661
Author: Morten Welinder <terra gnome org>
Date: Mon Feb 24 16:07:53 2014 -0500
Tests: biff7 has no diagonal borders.
Make the test ignore those.
test/t6502-styles.pl | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/test/t6502-styles.pl b/test/t6502-styles.pl
index 211cdd7..9d8a225 100755
--- a/test/t6502-styles.pl
+++ b/test/t6502-styles.pl
@@ -24,6 +24,9 @@ my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:
# 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\"};'";
+# Biff7 has no diagonals patterns.
+my $xls_diagonal_filter = "$PERL -p -e 'if (m{<gnm:StyleBorder>} .. m{</gnm:StyleBorder>}) { if
(m{gnm:(Rev-)?Diagonal}) { \$_=\"\"; } else { \$any++; } \$save .= \$_; if (m{</gnm:StyleBorder>}) { print
\$save if \$any>2; \$any = 0; \$save = \"\"; } \$_=\"\"; }'";
+
# 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}\"; }'";
@@ -32,9 +35,8 @@ my $xls_pattern_filter = "$PERL -p -e 'use English; my \%m=(19,14,20,7,21,4,22,4
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
- 'filter1' => "$xls_rotation_filter | $xls_pattern_filter",
- 'filter2' => $xls_codepage_filter ,
- 'ignore_failure' => 1);
+ 'filter1' => "$xls_rotation_filter | $xls_pattern_filter | $xls_diagonal_filter",
+ 'filter2' => $xls_codepage_filter);
&message ("Check style xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]