Commit 2fbc746f authored by Morten Welinder's avatar Morten Welinder

Tests: maintain and use a pool of standard filters.

This cuts down on copied filters of dubious quality.  If needed,
things can now be fixed in one place.
parent 0fcbeaef
2014-09-20 Morten Welinder <terra@gnome.org>
* GnumericTest.pm (normalize_filter): Maintain a catalog of
standard filters.
2014-09-11 Morten Welinder <terra@gnome.org>
* t6514-rich-text.pl: Hide comment author and rich text formatting
......
......@@ -376,6 +376,38 @@ sub test_exporter {
# -----------------------------------------------------------------------------
# The BIFF formats leave us with a msole:codepage property
my $drop_codepage_filter =
"$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
my $drop_generator_filter =
"$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'";
# BIFF7 doesn't store cell comment author
my $no_author_filter = "$PERL -p -e 's{ Author=\"[^\"]*\"}{};'";
# BIFF7 cannot store rich text comments
my $no_rich_comment_filter = "$PERL -p -e 'if (/gnm:CellComment/) { s{ TextFormat=\"[^\"]*\"}{}; }'";
# Excel cannot have superscript and subscript at the same time
my $supersub_filter = "$PERL -p -e 's{\\[superscript=1:(\\d+):(\\d+)\\]\\[subscript=1:(\\d+):\\2\\]}{[superscript=1:\$1:\$3][subscript=1:\$3:\$2]};'";
sub normalize_filter {
my ($f) = @_;
return 'cat' unless defined $f;
$f =~ s/std:drop_codepage/$drop_codepage_filter/;
$f =~ s/std:drop_generator/$drop_generator_filter/;
$f =~ s/std:no_author/$no_author_filter/;
$f =~ s/std:no_rich_comment/$no_rich_comment_filter/;
$f =~ s/std:supersub/$supersub_filter/;
return $f;
}
# -----------------------------------------------------------------------------
sub test_roundtrip {
my ($file,%named_args) = @_;
......@@ -386,8 +418,10 @@ sub test_roundtrip {
my $resize = $named_args{'resize'};
my $ignore_failure = $named_args{'ignore_failure'};
my $filter1 = $named_args{'filter1'} || $named_args{'filter'} || 'cat';
my $filter2 = $named_args{'filter2'} || $named_args{'filter'} || 'cat';
my $filter1 = &normalize_filter ($named_args{'filter1'} ||
$named_args{'filter'});
my $filter2 = &normalize_filter ($named_args{'filter2'} ||
$named_args{'filter'});
my $tmp = fileparse ($file);
$tmp =~ s/\.([a-zA-Z0-9]+)$// or die "Must have extension for roundtrip test.";
......
......@@ -16,9 +16,8 @@ my $file = "$samples/string-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
'filter2' => 'std:drop_generator');
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b(ValueType=\"60\">Greek[ ?]+)[^ ?<]}{\$1?})'";
&message ("Check string xls/BIFF7 roundtrip.");
......@@ -27,13 +26,13 @@ my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b(ValueType=\"60\">Greek[
'ext' => "xls",
'resize' => '16384x256',
'filter1' => $xls_greek_filter,
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check string xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check string xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -19,23 +19,21 @@ my $file = "$samples/number-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check number xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_filter,
'filter2' => 'std:drop_codepage',
'ignore_failure' => 1);
&message ("Check number xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_filter,
'filter2' => 'std:drop_codepage',
'ignore_failure' => 1);
&message ("Check number xlsx roundtrip.");
......
......@@ -16,9 +16,7 @@ my $file = "$samples/style-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
# 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\"};'";
......@@ -38,14 +36,14 @@ my $xls_pattern_filter = "$PERL -p -e 'use English; my \%m=(19,14,20,7,21,4,22,4
'ext' => "xls",
'resize' => '16384x256',
'filter1' => "$xls_rotation_filter | $xls_pattern_filter | $xls_diagonal_filter | $xls_indent_filter",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check style xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter1' => $xls_pattern_filter,
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check style xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -16,22 +16,20 @@ my $file = "$samples/page-setup-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check page-setup xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check page-setup xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check page-setup xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -16,22 +16,20 @@ my $file = "$samples/formula-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check formula xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check formula xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check formula xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -16,23 +16,21 @@ my $file = "$samples/colrow-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check col/row info xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter,
'filter2' => 'std:drop_codepage',
'ignore_failure' => 1);
&message ("Check col/row info xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter,
'filter2' => 'std:drop_codepage',
'ignore_failure' => 1);
&message ("Check col/row info xlsx roundtrip.");
......
......@@ -16,12 +16,7 @@ my $file = "$samples/cell-comment-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
# BIFF7 cannot store comment author
my $xls_no_author_filter = "$PERL -p -e 's{ Author=\"[^\"]*\"}{};'";
'filter2' => 'std:drop_generator');
my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b(Text=\"Greek[ ?]+)[^ ?\"]}{\$1?})'";
......@@ -30,14 +25,14 @@ my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b(Text=\"Greek[ ?]+)[^ ?\"
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter1' => "$xls_greek_filter | $xls_no_author_filter",
'filter2' => $xls_codepage_filter);
'filter1' => "$xls_greek_filter | std:no_author",
'filter2' => 'std:drop_codepage');
&message ("Check cell-comment xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check cell-comment xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -16,22 +16,20 @@ my $file = "$samples/split-panes-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check split-panes xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check split-panes xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check split-panes xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -16,22 +16,20 @@ my $file = "$samples/sheet-formatting-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check sheet-formatting xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check sheet-formatting xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check sheet-formatting xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -16,9 +16,7 @@ my $file = "$samples/validation-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b((Title|Message)=\".*Greek[ ?]+)[^ ?\"]}{\$1?})'";
......@@ -28,13 +26,13 @@ my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b((Title|Message)=\".*Gree
'ext' => "xls",
'resize' => '16384x256',
'filter1' => $xls_greek_filter,
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check validation xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check validation xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -16,9 +16,7 @@ my $file = "$samples/auto-filter-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b((Title|Message)=\".*Greek[ ?]+)[^ ?\"]}{\$1?})'";
......@@ -28,13 +26,13 @@ my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b((Title|Message)=\".*Gree
'ext' => "xls",
'resize' => '16384x256',
'filter1' => $xls_greek_filter,
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check auto-filter xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check auto-filter xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -19,11 +19,9 @@ if (1) {
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
'filter2' => 'std:drop_generator');
}
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
if (1) {
&message ("Not checking solver xls/BIFF7 roundtrip -- format is deficient");
} else {
......@@ -32,7 +30,7 @@ if (1) {
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
}
if (1) {
......@@ -42,7 +40,7 @@ if (1) {
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
}
if (1) {
......
......@@ -19,22 +19,20 @@ my $file = "$samples/format-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check format xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check format xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check format xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -19,22 +19,20 @@ my $file = "$samples/merge-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check merges xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check merges xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check merges xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -19,37 +19,26 @@ my $file = "$samples/rich-text-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
# xls cannot have superscript and subscript at the same time
my $xls_supersub_filter = "$PERL -p -e 's{\\[superscript=1:3:5\\]\\[subscript=1:4:5\\]}{[superscript=1:3:4][subscript=1:4:5]};'";
# BIFF7 cannot store comment author
my $xls_no_author_filter = "$PERL -p -e 's{ Author=\"[^\"]*\"}{};'";
# BIFF7 cannot store rich text comments
my $xls_no_rich_comment = "$PERL -p -e 'if (/gnm:CellComment/) { s{ TextFormat=\"[^\"]*\"}{}; }'";
'filter2' => 'std:drop_generator');
&message ("Check rich text xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter1' => "$xls_supersub_filter | $xls_no_author_filter | $xls_no_rich_comment",
'filter2' => $xls_codepage_filter);
'filter1' => "std:supersub | std:no_author | std:no_rich_comment",
'filter2' => 'std:drop_codepage');
&message ("Check rich text xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter1' => $xls_supersub_filter,
'filter2' => $xls_codepage_filter);
'filter1' => 'std:supersub',
'filter2' => 'std:drop_codepage');
&message ("Check rich text xlsx roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:xlsx',
'ext' => "xlsx",
'resize' => '1048576x16384',
'filter1' => $xls_supersub_filter);
'filter1' => 'std:supersub');
......@@ -16,27 +16,20 @@ my $file = "$samples/cond-format-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
# xls/biff cannot handle format in conditional formats.
my $xls_cond_format_filter = "$PERL -p -e 'if (m{<gnm:Condition\\b} ... m{</gnm:Condition\\b}) { s{\\s+Format=\"[^\"\"]*\"}{}; }'";
'filter2' => 'std:drop_generator');
&message ("Check conditional format xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
# 'filter1' => $xls_cond_format_filter,
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check conditional format xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'# filter1' => $xls_cond_format_filter,
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
&message ("Check conditional format xlsx roundtrip.");
&test_roundtrip ($file,
......
......@@ -20,11 +20,9 @@ my $ods_outline_filter = "$PERL -p -e 'if (/\\bmarker\\b.*fill-color=\"([A-Z0-9:
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter1' => $ods_outline_filter,
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'",
'filter2' => 'std:drop_generator',
'ignore_failure' => 1);
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
if (0) {
# We don't save graphs, so don't test.
&message ("Check graph xls/BIFF7 roundtrip.");
......@@ -32,14 +30,14 @@ if (0) {
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter);
'filter2' => 'std:drop_codepage');
}
&message ("Check graph xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter,
'filter2' => 'std:drop_codepage',
'ignore_failure' => 1);
&message ("Check graph xlsx roundtrip.");
......
......@@ -16,23 +16,21 @@ my $file = "$samples/names-tests.gnumeric";
&test_roundtrip ($file,
'format' => 'Gnumeric_OpenCalc:odf',
'ext' => "ods",
'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'");
my $xls_codepage_filter = "$PERL -p -e '\$_ = \"\" if m{<meta:user-defined meta:name=.msole:codepage.}'";
'filter2' => 'std:drop_generator');
&message ("Check names xls/BIFF7 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff7',
'ext' => "xls",
'resize' => '16384x256',
'filter2' => $xls_codepage_filter,
'filter2' => 'std:drop_codepage',
'ignore_failure' => 1);
&message ("Check names xls/BIFF8 roundtrip.");
&test_roundtrip ($file,
'format' => 'Gnumeric_Excel:excel_biff8',
'ext' => "xls",
'filter2' => $xls_codepage_filter,
'filter2' => 'std:drop_codepage',
'ignore_failure' => 1);
&message ("Check names xlsx roundtrip.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment