[gnumeric] Tests: new test for auto-filter.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Tests: new test for auto-filter.
- Date: Sun, 2 Mar 2014 03:15:30 +0000 (UTC)
commit fd0fe1209e81093a577a697ebefc665709f741af
Author: Morten Welinder <terra gnome org>
Date: Sat Mar 1 13:23:49 2014 -0500
Tests: new test for auto-filter.
samples/auto-filter-tests.gnumeric | Bin 0 -> 2851 bytes
test/Makefile.am | 1 +
test/t6510-auto-filter.pl | 44 ++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/samples/auto-filter-tests.gnumeric b/samples/auto-filter-tests.gnumeric
new file mode 100644
index 0000000..2c930b0
Binary files /dev/null and b/samples/auto-filter-tests.gnumeric differ
diff --git a/test/Makefile.am b/test/Makefile.am
index 523fc73..0acdca8 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -82,6 +82,7 @@ TESTS = t1000-statfuns.pl \
t6507-split-panes.pl \
t6508-sheet-formatting.pl \
t6509-validation.pl \
+ t6510-auto-filter.pl \
t7000-goal-seek.pl \
t7100-solver-blend.pl \
t7101-solver-afiro.pl \
diff --git a/test/t6510-auto-filter.pl b/test/t6510-auto-filter.pl
new file mode 100755
index 0000000..de5cd89
--- /dev/null
+++ b/test/t6510-auto-filter.pl
@@ -0,0 +1,44 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+my $file = "$samples/auto-filter-tests.gnumeric";
+
+&message ("Check auto-filter gnumeric roundtrip.");
+&test_roundtrip ($file,
+ 'format' => 'Gnumeric_XmlIO:sax',
+ 'ext' => "gnm");
+
+&message ("Check auto-filter ods roundtrip.");
+&test_roundtrip ($file,
+ 'format' => 'Gnumeric_OpenCalc:odf',
+ 'ext' => "ods",
+ 'filter2' => "$PERL -p -e '\$_ = \"\" if m{<meta:generator>}'",
+ 'ignore_failure' => 1);
+
+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((Title|Message)=\".*Greek[ ?]+)[^ ?\"]}{\$1?})'";
+
+&message ("Check auto-filter xls/BIFF7 roundtrip.");
+&test_roundtrip ($file,
+ 'format' => 'Gnumeric_Excel:excel_biff7',
+ 'ext' => "xls",
+ 'resize' => '16384x256',
+ 'filter1' => $xls_greek_filter,
+ 'filter2' => $xls_codepage_filter);
+
+&message ("Check auto-filter xls/BIFF8 roundtrip.");
+&test_roundtrip ($file,
+ 'format' => 'Gnumeric_Excel:excel_biff8',
+ 'ext' => "xls",
+ 'filter2' => $xls_codepage_filter);
+
+&message ("Check auto-filter xlsx roundtrip.");
+&test_roundtrip ($file,
+ 'format' => 'Gnumeric_Excel:xlsx',
+ 'ext' => "xlsx",
+ 'resize' => '1048576x16384');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]