[gnumeric] tests: enable subtest selection



commit 67738c5e91144f77dd30d6f6bc2822203d92b7a2
Author: Morten Welinder <terra gnome org>
Date:   Sat Jan 24 17:55:29 2015 -0500

    tests: enable subtest selection
    
    ./t6156-graph.pl --subtests ods,xlsx
    ./t6156-graph.pl --subtests '*,-ods,-biff7'

 test/GnumericTest.pm           |   40 +++++++++++++++++---
 test/t6500-strings.pl          |   68 +++++++++++++++++++--------------
 test/t6501-numbers.pl          |   80 +++++++++++++++++++++++-----------------
 test/t6502-styles.pl           |   74 +++++++++++++++++++++----------------
 test/t6503-page-setup.pl       |   60 +++++++++++++++++------------
 test/t6504-formula.pl          |   60 +++++++++++++++++------------
 test/t6505-colrow.pl           |   64 ++++++++++++++++++-------------
 test/t6506-cell-comments.pl    |   68 +++++++++++++++++++--------------
 test/t6507-split-panes.pl      |   60 +++++++++++++++++------------
 test/t6508-sheet-formatting.pl |   60 +++++++++++++++++------------
 test/t6509-validation.pl       |   68 +++++++++++++++++++--------------
 test/t6510-auto-filter.pl      |   68 +++++++++++++++++++--------------
 test/t6511-solver.pl           |   31 +++++++--------
 test/t6512-format.pl           |   68 +++++++++++++++++++--------------
 test/t6513-merges.pl           |   68 +++++++++++++++++++--------------
 test/t6514-rich-text.pl        |   74 +++++++++++++++++++++----------------
 test/t6515-cond-format.pl      |   60 +++++++++++++++++------------
 test/t6516-graph.pl            |   62 ++++++++++++++++++-------------
 test/t6517-names.pl            |   66 +++++++++++++++++++--------------
 19 files changed, 699 insertions(+), 500 deletions(-)
---
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index e4a1c4e..9fb1f4b 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -10,12 +10,12 @@ $| = 1;
 @GnumericTest::ISA = qw (Exporter);
 @GnumericTest::EXPORT = qw(test_sheet_calc test_valgrind
                            test_importer test_exporter test_roundtrip
-                          test_ssindex sstest test_command message
+                          test_ssindex sstest test_command message subtest
                           $ssconvert $sstest $ssdiff $topsrc $top_builddir
-                          $samples $PERL);
+                          $subtests $samples $PERL);
 @GnumericTest::EXPORT_OK = qw(junkfile);
 
-use vars qw($topsrc $top_builddir $samples $PERL $verbose);
+use vars qw($topsrc $top_builddir $samples $default_subtests $subtests $PERL $verbose);
 use vars qw($ssconvert $ssindex $sstest $ssdiff);
 use vars qw($normalize_gnumeric);
 
@@ -34,6 +34,8 @@ $sstest = "$top_builddir/src/sstest";
 $ssdiff = "$top_builddir/src/ssdiff";
 $normalize_gnumeric = "$PERL $topsrc/test/normalize-gnumeric";
 $verbose = 0;
+$default_subtests = '*';
+$subtests = undef;
 
 # -----------------------------------------------------------------------------
 
@@ -145,6 +147,24 @@ sub message {
 
 # -----------------------------------------------------------------------------
 
+sub subtest {
+    my ($q) = @_;
+
+    my $res = 0;
+    foreach my $t (split (',', $subtests || $default_subtests)) {
+       if ($t eq '*' || $t eq $q) {
+           $res = 1;
+           next;
+       } elsif ($t eq '-*' || $t eq "-$q") {
+           $res = 0;
+           next;
+       }
+    }
+    return $res;
+}
+
+# -----------------------------------------------------------------------------
+
 sub test_command {
     my ($cmd,$test) = @_;
 
@@ -675,9 +695,17 @@ $ENV{'LC_ALL'} = 'C';
 # libgsf listens for this
 delete $ENV{'WINDOWS_LANGUAGE'};
 
-if (@ARGV && $ARGV[0] eq '--verbose') {
-    $verbose = 1;
-    scalar shift @ARGV;
+while (1) {
+    if (@ARGV && $ARGV[0] eq '--verbose') {
+       $verbose = 1;
+       scalar shift @ARGV;
+       next;
+    } elsif (@ARGV > 1 && $ARGV[0] eq '--subtests') {
+       scalar shift @ARGV;
+       $subtests = shift @ARGV;
+    } else {
+       last;
+    }
 }
 
 1;
diff --git a/test/t6500-strings.pl b/test/t6500-strings.pl
index e82b662..f1009bc 100755
--- a/test/t6500-strings.pl
+++ b/test/t6500-strings.pl
@@ -7,35 +7,45 @@ use GnumericTest;
 
 my $file = "$samples/string-tests.gnumeric";
 
-&message ("Check string gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
-
-&message ("Check string ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("gnumeric")) {
+    &message ("Check string gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check string ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
 my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b(ValueType=\"60\">Greek[ ?]+)[^ ?<]}{\$1?})'";
 
-&message ("Check string xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter1' => $xls_greek_filter,
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check string xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check string xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("biff7")) {
+    &message ("Check string xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter1' => $xls_greek_filter,
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check string xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check string xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6501-numbers.pl b/test/t6501-numbers.pl
index e5f5743..e361380 100755
--- a/test/t6501-numbers.pl
+++ b/test/t6501-numbers.pl
@@ -7,37 +7,49 @@ use GnumericTest;
 
 my $file = "$samples/number-tests.gnumeric";
 
-&message ("Check that $file evaluates correctly.");
-&test_sheet_calc ($file, "F1", sub { /TRUE/ });
-
-&message ("Check number gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
-
-&message ("Check number ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
-
-&message ("Check number xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage',
-                'ignore_failure' => 1);
-
-&message ("Check number xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage',
-                'ignore_failure' => 1);
-
-&message ("Check number xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("eval")) {
+    &message ("Check that $file evaluates correctly.");
+    &test_sheet_calc ($file, "F1", sub { /TRUE/ });
+}
+
+if (&subtest ("gnumeric")) {
+    &message ("Check number gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check number ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
+
+if (&subtest ("biff7")) {
+    &message ("Check number xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage',
+                    'ignore_failure' => 1);
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check number xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage',
+                    'ignore_failure' => 1);
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check number xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6502-styles.pl b/test/t6502-styles.pl
index f55ab55..a94a0b0 100755
--- a/test/t6502-styles.pl
+++ b/test/t6502-styles.pl
@@ -7,16 +7,20 @@ use GnumericTest;
 
 my $file = "$samples/style-tests.gnumeric";
 
-&message ("Check style gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
-
-&message ("Check style ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("gnumeric")) {
+    &message ("Check style gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check style ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
 # Biff7 only handles a few fixed rotations.
 my $xls_rotation_filter = "$PERL -p -e 's{\\b(Rotation)=\"315\"}{\$1=\"270\"}; 
s{\\b(Rotation)=\"45\"}{\$1=\"0\"};'";
@@ -27,27 +31,33 @@ my $xls_diagonal_filter = "$PERL -p -e 'if (m{<gnm:StyleBorder>} .. m{</gnm:Styl
 # Biff7 doesn't store indentation
 my $xls_indent_filter = "$PERL -p -e 's{\\bIndent=\"[1-9]\\d*\"}{Indent=\"0\"};'";
 
-# Our patterns 19-24 do not exists in xls
+# Our patterns 19-24 do not exist in xls
 my $xls_pattern_filter = "$PERL -p -e 'use English; my \%m=(19,14,20,7,21,4,22,4,23,2,24,1); if 
(m{\\bShade=\"(\\d+)\"} && (\$n = \$m{\$1})) { \$_ = \"\${PREMATCH}Shade=\\\"\$n\\\"\${POSTMATCH}\"; }'";
 
-&message ("Check style xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter1' => "$xls_rotation_filter | $xls_pattern_filter | $xls_diagonal_filter | 
$xls_indent_filter",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check style xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter1' => $xls_pattern_filter,
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check style xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384',
-                'filter1' => $xls_pattern_filter);
+if (&subtest ("biff7")) {
+    &message ("Check style xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter1' => "$xls_rotation_filter | $xls_pattern_filter | $xls_diagonal_filter | 
$xls_indent_filter",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check style xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter1' => $xls_pattern_filter,
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check style xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384',
+                    'filter1' => $xls_pattern_filter);
+}
diff --git a/test/t6503-page-setup.pl b/test/t6503-page-setup.pl
index aa07e6e..701faa6 100755
--- a/test/t6503-page-setup.pl
+++ b/test/t6503-page-setup.pl
@@ -7,32 +7,42 @@ use GnumericTest;
 
 my $file = "$samples/page-setup-tests.gnumeric";
 
-&message ("Check page-setup gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("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' => 'std:drop_generator');
+if (&subtest ("ods")) {
+    &message ("Check page-setup ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
-&message ("Check page-setup xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff7")) {
+    &message ("Check page-setup xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check page-setup xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff8")) {
+    &message ("Check page-setup xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check page-setup xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("xlsx")) {
+    &message ("Check page-setup xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6504-formula.pl b/test/t6504-formula.pl
index 71eca72..12468dc 100755
--- a/test/t6504-formula.pl
+++ b/test/t6504-formula.pl
@@ -7,32 +7,42 @@ use GnumericTest;
 
 my $file = "$samples/formula-tests.gnumeric";
 
-&message ("Check formula gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("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' => 'std:drop_generator');
+if (&subtest ("ods")) {
+    &message ("Check formula ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
-&message ("Check formula xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff7")) {
+    &message ("Check formula xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check formula xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff8")) {
+    &message ("Check formula xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check formula xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("xlsx")) {
+    &message ("Check formula xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6505-colrow.pl b/test/t6505-colrow.pl
index 92af8e1..2b1fb14 100755
--- a/test/t6505-colrow.pl
+++ b/test/t6505-colrow.pl
@@ -7,34 +7,44 @@ use GnumericTest;
 
 my $file = "$samples/colrow-tests.gnumeric";
 
-&message ("Check col/row info gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("gnumeric")) {
+    &message ("Check col/row info gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
 
-&message ("Check col/row info ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("ods")) {
+    &message ("Check col/row info ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
-&message ("Check col/row info xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage',
-                'ignore_failure' => 1);
+if (&subtest ("biff7")) {
+    &message ("Check col/row info xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage',
+                    'ignore_failure' => 1);
+}
 
-&message ("Check col/row info xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage',
-                'ignore_failure' => 1);
+if (&subtest ("biff8")) {
+    &message ("Check col/row info xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage',
+                    'ignore_failure' => 1);
+}
 
-&message ("Check col/row info xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("xlsx")) {
+    &message ("Check col/row info xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6506-cell-comments.pl b/test/t6506-cell-comments.pl
index 0003c92..d61ecc1 100755
--- a/test/t6506-cell-comments.pl
+++ b/test/t6506-cell-comments.pl
@@ -7,35 +7,45 @@ use GnumericTest;
 
 my $file = "$samples/cell-comment-tests.gnumeric";
 
-&message ("Check cell-comment gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
-
-&message ("Check cell-comment ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("gnumeric")) {
+    &message ("Check cell-comment gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check cell-comment ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
 my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b(Text=\"Greek[ ?]+)[^ ?\"]}{\$1?})'";
 
-&message ("Check cell-comment xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter1' => "$xls_greek_filter | std:no_author",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check cell-comment xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check cell-comment xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("biff7")) {
+    &message ("Check cell-comment xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter1' => "$xls_greek_filter | std:no_author",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check cell-comment xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check cell-comment xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6507-split-panes.pl b/test/t6507-split-panes.pl
index 75f43a1..b1791b9 100755
--- a/test/t6507-split-panes.pl
+++ b/test/t6507-split-panes.pl
@@ -7,32 +7,42 @@ use GnumericTest;
 
 my $file = "$samples/split-panes-tests.gnumeric";
 
-&message ("Check split-panes gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("gnumeric")) {
+    &message ("Check split-panes gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
 
-&message ("Check split-panes ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("ods")) {
+    &message ("Check split-panes ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
-&message ("Check split-panes xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff7")) {
+    &message ("Check split-panes xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check split-panes xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff8")) {
+    &message ("Check split-panes xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check split-panes xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("xlsx")) {
+    &message ("Check split-panes xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6508-sheet-formatting.pl b/test/t6508-sheet-formatting.pl
index ca20bc0..5288df6 100755
--- a/test/t6508-sheet-formatting.pl
+++ b/test/t6508-sheet-formatting.pl
@@ -7,32 +7,42 @@ use GnumericTest;
 
 my $file = "$samples/sheet-formatting-tests.gnumeric";
 
-&message ("Check sheet-formatting gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("gnumeric")) {
+    &message ("Check sheet-formatting gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
 
-&message ("Check sheet-formatting ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("ods")) {
+    &message ("Check sheet-formatting ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
-&message ("Check sheet-formatting xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff7")) {
+    &message ("Check sheet-formatting xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check sheet-formatting xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff8")) {
+    &message ("Check sheet-formatting xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check sheet-formatting xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("xlsx")) {
+    &message ("Check sheet-formatting xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6509-validation.pl b/test/t6509-validation.pl
index 5b2da66..9eed0a9 100755
--- a/test/t6509-validation.pl
+++ b/test/t6509-validation.pl
@@ -7,35 +7,45 @@ use GnumericTest;
 
 my $file = "$samples/validation-tests.gnumeric";
 
-&message ("Check validation gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
-
-&message ("Check validation ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("gnumeric")) {
+    &message ("Check validation gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check validation ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
 my $xls_greek_filter = "$PERL -p -C7 -e '1 while (s{\\b((Title|Message)=\".*Greek[ ?]+)[^ ?\"]}{\$1?})'";
 
-&message ("Check validation xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter1' => $xls_greek_filter,
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check validation xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check validation xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("biff7")) {
+    &message ("Check validation xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter1' => $xls_greek_filter,
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check validation xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check validation xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6510-auto-filter.pl b/test/t6510-auto-filter.pl
index df299ad..2f749b4 100755
--- a/test/t6510-auto-filter.pl
+++ b/test/t6510-auto-filter.pl
@@ -7,35 +7,45 @@ 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' => 'std:drop_generator');
+if (&subtest ("gnumeric")) {
+    &message ("Check auto-filter gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check auto-filter ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
 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' => 'std:drop_codepage');
-
-&message ("Check auto-filter xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check auto-filter xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("biff7")) {
+    &message ("Check auto-filter xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter1' => $xls_greek_filter,
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check auto-filter xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check auto-filter xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6511-solver.pl b/test/t6511-solver.pl
index 468b5e1..4ecb273 100755
--- a/test/t6511-solver.pl
+++ b/test/t6511-solver.pl
@@ -6,15 +6,17 @@ use lib ($0 =~ m|^(.*/)| ? $1 : ".");
 use GnumericTest;
 
 my $file = "$samples/solver-tests.gnumeric";
+$GnumericTest::default_subtests = 'gnumeric';
 
-&message ("Check solver gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("gnumeric")) {
+    &message ("Check solver gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
 
-if (1) {
-    &message ("Not checking solver ods roundtrip -- format is deficient");
-} else {
+if (&subtest ("ods")) {
+    # Format is deficient
     &message ("Check solver ods roundtrip.");
     &test_roundtrip ($file,
                     'format' => 'Gnumeric_OpenCalc:odf',
@@ -22,9 +24,8 @@ if (1) {
                     'filter2' => 'std:drop_generator');
 }
 
-if (1) {
-    &message ("Not checking solver xls/BIFF7 roundtrip -- format is deficient");
-} else {
+if (&subtest ("biff7")) {
+    # Format is deficient
     &message ("Check solver xls/BIFF7 roundtrip.");
     &test_roundtrip ($file,
                     'format' => 'Gnumeric_Excel:excel_biff7',
@@ -33,9 +34,8 @@ if (1) {
                     'filter2' => 'std:drop_codepage');
 }
 
-if (1) {
-    &message ("Not checking solver xls/BIFF8 roundtrip -- format is deficient");
-} else {
+if (&subtest ("biff8")) {
+    # Format is deficient
     &message ("Check solver xls/BIFF8 roundtrip.");
     &test_roundtrip ($file,
                     'format' => 'Gnumeric_Excel:excel_biff8',
@@ -43,9 +43,8 @@ if (1) {
                     'filter2' => 'std:drop_codepage');
 }
 
-if (1) {
-    &message ("Not checking solver xlsx roundtrip -- format is deficient");
-} else {
+if (&subtest ("xlsx")) {
+    # Format is deficient
     &message ("Check solver xlsx roundtrip.");
     &test_roundtrip ($file,
                     'format' => 'Gnumeric_Excel:xlsx',
diff --git a/test/t6512-format.pl b/test/t6512-format.pl
index cb30a6f..3904d5f 100755
--- a/test/t6512-format.pl
+++ b/test/t6512-format.pl
@@ -10,32 +10,42 @@ use GnumericTest;
 
 my $file = "$samples/format-tests.gnumeric";
 
-&message ("Check format gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
-
-&message ("Check format ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
-
-&message ("Check format xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check format xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check format xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("gnumeric")) {
+    &message ("Check format gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check format ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
+
+if (&subtest ("biff7")) {
+    &message ("Check format xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check format xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check format xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6513-merges.pl b/test/t6513-merges.pl
index 04fb301..2bc0d0e 100755
--- a/test/t6513-merges.pl
+++ b/test/t6513-merges.pl
@@ -10,32 +10,42 @@ use GnumericTest;
 
 my $file = "$samples/merge-tests.gnumeric";
 
-&message ("Check merges gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
-
-&message ("Check merges ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
-
-&message ("Check merges xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check merges xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check merges xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("gnumeric")) {
+    &message ("Check merges gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check merges ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
+
+if (&subtest ("biff7")) {
+    &message ("Check merges xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check merges xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check merges xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6514-rich-text.pl b/test/t6514-rich-text.pl
index 3265931..71f5310 100755
--- a/test/t6514-rich-text.pl
+++ b/test/t6514-rich-text.pl
@@ -10,35 +10,45 @@ 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' => 'std:drop_generator');
-
-&message ("Check rich text xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter1' => "std:supersub | std:no_author | std:no_rich_comment",
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check rich text xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter1' => 'std:supersub',
-                'filter2' => 'std:drop_codepage');
-
-&message ("Check rich text xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384',
-                'filter1' => 'std:supersub');
+if (&subtest ("gnumeric")) {
+    &message ("Check rich text gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
+
+if (&subtest ("ods")) {
+    &message ("Check rich text ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
+
+if (&subtest ("biff7")) {
+    &message ("Check rich text xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter1' => "std:supersub | std:no_author | std:no_rich_comment",
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("biff8")) {
+    &message ("Check rich text xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter1' => 'std:supersub',
+                    'filter2' => 'std:drop_codepage');
+}
+
+if (&subtest ("xlsx")) {
+    &message ("Check rich text xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384',
+                    'filter1' => 'std:supersub');
+}
diff --git a/test/t6515-cond-format.pl b/test/t6515-cond-format.pl
index 3782bc9..e890a69 100755
--- a/test/t6515-cond-format.pl
+++ b/test/t6515-cond-format.pl
@@ -7,32 +7,42 @@ use GnumericTest;
 
 my $file = "$samples/cond-format-tests.gnumeric";
 
-&message ("Check conditional format gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("gnumeric")) {
+    &message ("Check conditional format gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
 
-&message ("Check conditional format ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("ods")) {
+    &message ("Check conditional format ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
-&message ("Check conditional format xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff7")) {
+    &message ("Check conditional format xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check conditional format xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage');
+if (&subtest ("biff8")) {
+    &message ("Check conditional format xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage');
+}
 
-&message ("Check conditional format xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384');
+if (&subtest ("xlsx")) {
+    &message ("Check conditional format xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384');
+}
diff --git a/test/t6516-graph.pl b/test/t6516-graph.pl
index 404d84d..ff6ba52 100755
--- a/test/t6516-graph.pl
+++ b/test/t6516-graph.pl
@@ -6,24 +6,30 @@ use lib ($0 =~ m|^(.*/)| ? $1 : ".");
 use GnumericTest;
 
 my $file = "$samples/graph-tests.gnumeric";
+$GnumericTest::default_subtests = '*,-biff7';
 
-&message ("Check graph gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+
+if (&subtest ("gnumeric")) {
+    &message ("Check graph gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
 
 # ods doesn't have outline colour, so copy the fill colour.
 my $ods_outline_filter = "$PERL -p -e 'if (/\\bmarker\\b.*fill-color=\"([A-Z0-9:]+)\"/) { my \$col = \$1; 
s{\\b(outline-color)=\"[A-Z0-9:]+\"}{\$1=\"\$col\"}; }'";
 
-&message ("Check graph ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter1' => $ods_outline_filter,
-                'filter2' => 'std:drop_generator',
-                'ignore_failure' => 1);
+if (&subtest ("ods")) {
+    &message ("Check graph ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter1' => $ods_outline_filter,
+                    'filter2' => 'std:drop_generator',
+                    'ignore_failure' => 1);
+}
 
-if (0) {
+if (&subtest ("biff7")) {
     # We don't save graphs, so don't test.
     &message ("Check graph xls/BIFF7 roundtrip.");
     &test_roundtrip ($file,
@@ -38,21 +44,25 @@ my $xls_drop_pts_size = "$PERL -p -e '\$_ = \"\" if m{^\\s*<property name=\"(wid
 
 my $xls_missing_marker_shapes = "$PERL -p -e 
's/\\bshape=\"(hourglass|butterfly|lefthalf-bar)\"/shape=\"square\"/; 
s/\\bshape=\"triangle-(down|left|right)\"/shape=\"triangle-up\"/;'";
 
-&message ("Check graph xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter1' => "$xls_drop_pts_size | $xls_missing_marker_shapes",
-                'filter2' => 'std:drop_codepage',
-                'ignore_failure' => 1);
+if (&subtest ("biff8")) {
+    &message ("Check graph xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter1' => "$xls_drop_pts_size | $xls_missing_marker_shapes",
+                    'filter2' => 'std:drop_codepage',
+                    'ignore_failure' => 1);
+}
 
 my $xlsx_missing_marker_shapes = "$PERL -p -e 's/\\bshape=\"(hourglass|butterfly)\"/shape=\"diamond\"/;'";
 
 
-&message ("Check graph xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384',
-                'filter1' => "$xls_drop_pts_size | $xlsx_missing_marker_shapes",
-                'ignore_failure' => 1);
+if (&subtest ("xlsx")) {
+    &message ("Check graph xlsx roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:xlsx',
+                    'ext' => "xlsx",
+                    'resize' => '1048576x16384',
+                    'filter1' => "$xls_drop_pts_size | $xlsx_missing_marker_shapes",
+                    'ignore_failure' => 1);
+}
diff --git a/test/t6517-names.pl b/test/t6517-names.pl
index 0109f41..4cb47bf 100755
--- a/test/t6517-names.pl
+++ b/test/t6517-names.pl
@@ -7,35 +7,45 @@ use GnumericTest;
 
 my $file = "$samples/names-tests.gnumeric";
 
-&message ("Check names gnumeric roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_XmlIO:sax',
-                'ext' => "gnm");
+if (&subtest ("gnumeric")) {
+    &message ("Check names gnumeric roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_XmlIO:sax',
+                    'ext' => "gnm");
+}
 
-&message ("Check names ods roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_OpenCalc:odf',
-                'ext' => "ods",
-                'filter2' => 'std:drop_generator');
+if (&subtest ("ods")) {
+    &message ("Check names ods roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_OpenCalc:odf',
+                    'ext' => "ods",
+                    'filter2' => 'std:drop_generator');
+}
 
-&message ("Check names xls/BIFF7 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff7',
-                'ext' => "xls",
-                'resize' => '16384x256',
-                'filter2' => 'std:drop_codepage',
-                'ignore_failure' => 1);
+if (&subtest ("biff7")) {
+    &message ("Check names xls/BIFF7 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff7',
+                    'ext' => "xls",
+                    'resize' => '16384x256',
+                    'filter2' => 'std:drop_codepage',
+                    'ignore_failure' => 1);
+}
 
-&message ("Check names xls/BIFF8 roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:excel_biff8',
-                'ext' => "xls",
-                'filter2' => 'std:drop_codepage',
-                'ignore_failure' => 1);
+if (&subtest ("biff8")) {
+    &message ("Check names xls/BIFF8 roundtrip.");
+    &test_roundtrip ($file,
+                    'format' => 'Gnumeric_Excel:excel_biff8',
+                    'ext' => "xls",
+                    'filter2' => 'std:drop_codepage',
+                    'ignore_failure' => 1);
+}
 
-&message ("Check names xlsx roundtrip.");
-&test_roundtrip ($file,
-                'format' => 'Gnumeric_Excel:xlsx',
-                'ext' => "xlsx",
-                'resize' => '1048576x16384',
-                'ignore_failure' => 1);
+if (&subtest ("xlsx")) {
+    &message ("Check names 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]