[gnumeric] Tests: add test for solver settings.



commit f71593e005cc69647ce9cf690ecb9f91e0f67673
Author: Morten Welinder <terra gnome org>
Date:   Thu Mar 6 09:37:27 2014 -0500

    Tests: add test for solver settings.
    
    We fail for all non-gnumeric formats.

 NEWS                          |    1 +
 samples/solver-tests.gnumeric |  Bin 0 -> 1854 bytes
 test/Makefile.am              |    1 +
 test/t6511-solver.pl          |   44 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index b7c2805..504824c 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Andreas:
 
 Morten:
        * Support volatile functions.  [#305798]
+       * Improve testing.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.12
diff --git a/samples/solver-tests.gnumeric b/samples/solver-tests.gnumeric
new file mode 100644
index 0000000..0abe617
Binary files /dev/null and b/samples/solver-tests.gnumeric differ
diff --git a/test/Makefile.am b/test/Makefile.am
index c8ee0a3..4e2a166 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -83,6 +83,7 @@ TESTS =       t1000-statfuns.pl                       \
        t6508-sheet-formatting.pl               \
        t6509-validation.pl                     \
        t6510-auto-filter.pl                    \
+       t6511-solver.pl                         \
        t7000-goal-seek.pl                      \
        t7100-solver-blend.pl                   \
        t7101-solver-afiro.pl                   \
diff --git a/test/t6511-solver.pl b/test/t6511-solver.pl
new file mode 100755
index 0000000..39b504c
--- /dev/null
+++ b/test/t6511-solver.pl
@@ -0,0 +1,44 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+my $file = "$samples/solver-tests.gnumeric";
+
+&message ("Check solver gnumeric roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_XmlIO:sax',
+                'ext' => "gnm");
+
+&message ("Check solver 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 solver xls/BIFF7 roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_Excel:excel_biff7',
+                'ext' => "xls",
+                'resize' => '16384x256',
+                'filter2' => $xls_codepage_filter,
+                'ignore_failure' => 1);
+
+&message ("Check solver xls/BIFF8 roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_Excel:excel_biff8',
+                'ext' => "xls",
+                'filter2' => $xls_codepage_filter,
+                'ignore_failure' => 1);
+
+&message ("Check solver 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]