[gnumeric] Tests: start on formula tests.



commit 939c6a27fe4f35b3cd10b6da81f6529d109689e9
Author: Morten Welinder <terra gnome org>
Date:   Fri Feb 21 13:04:58 2014 -0500

    Tests: start on formula tests.

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