[gnumeric] Tests: add test for page setup roundtrip.



commit 77f00e468c4104da1e3571381b09fc848b62d00e
Author: Morten Welinder <terra gnome org>
Date:   Thu Feb 20 14:26:02 2014 -0500

    Tests: add test for page setup roundtrip.

 samples/page-setup-tests.gnumeric |  Bin 0 -> 1729 bytes
 test/Makefile.am                  |    3 +-
 test/t6503-page-setup.pl          |   44 +++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/samples/page-setup-tests.gnumeric b/samples/page-setup-tests.gnumeric
new file mode 100644
index 0000000..abe3d0d
Binary files /dev/null and b/samples/page-setup-tests.gnumeric differ
diff --git a/test/Makefile.am b/test/Makefile.am
index 40b9564..998bdc7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -73,7 +73,8 @@ TESTS =       t1000-statfuns.pl                       \
        t6104-finfuns-ods.pl                    \
        t6500-strings.pl                        \
        t6501-numbers.pl                        \
-       t6501-style.pl                          \
+       t6502-style.pl                          \
+       t6503-page-setup.pl                             \
        t7000-goal-seek.pl                      \
        t7100-solver-blend.pl                   \
        t7101-solver-afiro.pl                   \
diff --git a/test/t6503-page-setup.pl b/test/t6503-page-setup.pl
new file mode 100755
index 0000000..2b6ac90
--- /dev/null
+++ b/test/t6503-page-setup.pl
@@ -0,0 +1,44 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+my $file = "$samples/page-setup-tests.gnumeric";
+
+&message ("Check page-setup gnumeric roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_XmlIO:sax',
+                'ext' => "gnm");
+
+&message ("Check page-setup 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.}'";
+
+&message ("Check page-setup xls/BIFF7 roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_Excel:excel_biff7',
+                'ext' => "xls",
+                'resize' => '16384x256',
+                'filter2' => $xls_codepage_filter ,
+                'ignore_failure' => 1);
+
+&message ("Check page-setup xls/BIFF8 roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_Excel:excel_biff8',
+                'ext' => "xls",
+                'filter2' => $xls_codepage_filter,
+                'ignore_failure' => 1);
+
+&message ("Check page-setup xlsx roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_Excel:xlsx',
+                'ext' => "xlsx",
+                'resize' => '1048576x16384',
+                'ignore_failure' => 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]