[gnumeric] Tests: add initial tests for rich text.



commit 48ebe17c2ce9425c1e9ce599b4c0fc6df9029af1
Author: Morten Welinder <terra gnome org>
Date:   Wed Mar 12 13:09:59 2014 -0400

    Tests: add initial tests for rich text.
    
    Excels formats all fail.

 samples/rich-text-tests.gnumeric |  Bin 0 -> 2010 bytes
 test/Makefile.am                 |    1 +
 test/t6514-rich-text.pl          |   46 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/samples/rich-text-tests.gnumeric b/samples/rich-text-tests.gnumeric
new file mode 100644
index 0000000..513d941
Binary files /dev/null and b/samples/rich-text-tests.gnumeric differ
diff --git a/test/Makefile.am b/test/Makefile.am
index 8a3f2ea..82e113d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -87,6 +87,7 @@ TESTS =       t1000-statfuns.pl                       \
        t6511-solver.pl                         \
        t6512-format.pl                         \
        t6513-merges.pl                         \
+       t6514-rich-text.pl                      \
        t7000-goal-seek.pl                      \
        t7100-solver-blend.pl                   \
        t7101-solver-afiro.pl                   \
diff --git a/test/t6514-rich-text.pl b/test/t6514-rich-text.pl
new file mode 100755
index 0000000..bd16ad2
--- /dev/null
+++ b/test/t6514-rich-text.pl
@@ -0,0 +1,46 @@
+#!/usr/bin/perl -w
+# -----------------------------------------------------------------------------
+
+# NOTE: this is an import/export tests.  We do not look at what is done
+# with the formats in the test files.
+
+use strict;
+use lib ($0 =~ m|^(.*/)| ? $1 : ".");
+use GnumericTest;
+
+my $file = "$samples/rich-text-tests.gnumeric";
+
+&message ("Check rich text gnumeric roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_XmlIO:sax',
+                'ext' => "gnm");
+
+&message ("Check rich text 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 rich text xls/BIFF7 roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_Excel:excel_biff7',
+                'ext' => "xls",
+                'resize' => '16384x256',
+                'filter2' => $xls_codepage_filter,
+                'ignore_failure' => 1);
+
+&message ("Check rich text xls/BIFF8 roundtrip.");
+&test_roundtrip ($file,
+                'format' => 'Gnumeric_Excel:excel_biff8',
+                'ext' => "xls",
+                'filter2' => $xls_codepage_filter,
+                'ignore_failure' => 1);
+
+&message ("Check rich text 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]