[gnumeric] Tests: update ods extended schema to handle multiple selections.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Tests: update ods extended schema to handle multiple selections.
- Date: Sun, 12 Apr 2015 18:19:44 +0000 (UTC)
commit 8e6b059f749f494dc9dcb8dff361f9a654dbd136
Author: Morten Welinder <terra gnome org>
Date: Sun Apr 12 14:18:59 2015 -0400
Tests: update ods extended schema to handle multiple selections.
test/ChangeLog | 10 +++++++
test/GnumericTest.pm | 8 ++++-
test/ods-ext-schema.patch | 6 ++--
test/t6150-ods-syntax.pl | 64 ++++----------------------------------------
4 files changed, 25 insertions(+), 63 deletions(-)
---
diff --git a/test/ChangeLog b/test/ChangeLog
index 4dbb0bf..7dd1d6f 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,13 @@
+2015-04-12 Morten Welinder <terra gnome org>
+
+ * t6150-ods-syntax.pl: Use default full corpos.
+
+ * ods-schema/OpenDocument-v1.2-os-ext-schema.rng: Allow multiple
+ selection.
+
+ * GnumericTest.pm (corpus): Allow specifying "--corpus /foo/" to
+ match a subset of the full corpus.
+
2015-03-23 Morten Welinder <terra gnome org>
* t2003-random-generators.pl (expected): Fix check to match sstest
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index a54a688..b6091d2 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -226,9 +226,9 @@ my @full_corpus =
);
sub corpus {
- my ($q) = @_;
+ my ($c) = @_;
- my $corpus = ($user_corpus || $default_corpus);
+ my $corpus = ($c || $user_corpus || $default_corpus);
if ($corpus eq 'full') {
return @full_corpus;
} elsif ($corpus =~ /^random:(\d+)$/) {
@@ -239,6 +239,10 @@ sub corpus {
splice @corpus, $i, 1;
}
return @corpus;
+ } elsif ($corpus =~ m{^/(.*)/$}) {
+ my $rx = $1;
+ my @corpus = grep { /$rx/ } @full_corpus;
+ return @corpus;
} else {
die "Invalid corpus specification\n";
}
diff --git a/test/ods-ext-schema.patch b/test/ods-ext-schema.patch
index ddbf9ea..7e205d6 100644
--- a/test/ods-ext-schema.patch
+++ b/test/ods-ext-schema.patch
@@ -1,5 +1,5 @@
--- ods-schema/OpenDocument-v1.2-os-schema.rng 2015-01-28 18:46:19.155715877 -0500
-+++ ods-schema/OpenDocument-v1.2-os-ext-schema.rng 2015-04-08 20:41:49.504569470 -0400
++++ ods-schema/OpenDocument-v1.2-os-ext-schema.rng 2015-04-12 14:14:37.624042609 -0400
@@ -62,6 +62,9 @@
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
@@ -413,9 +413,9 @@
+ <attribute name="gnm:cursor-row">
+ <ref name="integer"/>
+ </attribute>
-+ <optional>
++ <zeroOrMore>
+ <ref name="gnm-selection"/>
-+ </optional>
++ </zeroOrMore>
+ </element>
+ </define>
+ <define name="gnm-selection">
diff --git a/test/t6150-ods-syntax.pl b/test/t6150-ods-syntax.pl
index 9a94eee..874fbe1 100755
--- a/test/t6150-ods-syntax.pl
+++ b/test/t6150-ods-syntax.pl
@@ -41,6 +41,7 @@ if (!-r $schema_ext) {
print STDERR "Cannot find extended conformance schema\n";
$schema_ext = undef;
# This is not a schema supplies by oasis
+ $suggest_download = 1;
}
if (!-r $schema_manifest) {
print STDERR "Cannot find manifest schema\n";
@@ -58,64 +59,11 @@ my %checkers = ( 0 => $checker,
1 => $checker_ext,
2 => $manifest_checker);
-my @sources =
- ("$samples/excel/address.xls",
- "$samples/excel/bitwise.xls",
- "$samples/excel/chart-tests-excel.xls",
- "$samples/excel/datefuns.xls",
- "$samples/excel/dbfuns.xls",
- "$samples/excel/engfuns.xls",
- "$samples/excel/finfuns.xls",
- "$samples/excel/functions.xls",
- "$samples/excel/infofuns.xls",
- "$samples/excel/logfuns.xls",
- "$samples/excel/lookfuns2.xls",
- "$samples/excel/lookfuns.xls",
- "$samples/excel/mathfuns.xls",
- "$samples/excel/objs.xls",
- "$samples/excel/operator.xls",
- "$samples/excel/sort.xls",
- "$samples/excel/statfuns.xls",
- "$samples/excel/textfuns.xls",
- "$samples/excel/yalta2008.xls",
- "$samples/excel12/cellstyle.xlsx",
- # xmllint hangs on these files. (Well, amath finishes but takes too
- # long.)
- # "$samples/crlibm.gnumeric",
- # "$samples/amath.gnumeric",
- # "$samples/gamma.gnumeric",
- "$samples/linest.xls",
- "$samples/vba-725220.xls",
- "$samples/sumif.xls",
- "$samples/array-intersection.xls",
- "$samples/arrays.xls",
- "$samples/docs-samples.gnumeric",
- "$samples/ftest.xls",
- "$samples/ttest.xls",
- "$samples/chitest.xls",
- "$samples/numbermatch.gnumeric",
- "$samples/solver/afiro.mps",
- "$samples/solver/blend.mps",
- "$samples/auto-filter-tests.gnumeric",
- "$samples/cell-comment-tests.gnumeric",
- "$samples/colrow-tests.gnumeric",
- "$samples/cond-format-tests.gnumeric",
- "$samples/formula-tests.gnumeric",
- "$samples/graph-tests.gnumeric",
- "$samples/merge-tests.gnumeric",
- "$samples/names-tests.gnumeric",
- "$samples/number-tests.gnumeric",
- "$samples/object-tests.gnumeric",
- "$samples/page-setup-tests.gnumeric",
- "$samples/rich-text-tests.gnumeric",
- "$samples/sheet-formatting-tests.gnumeric",
- "$samples/solver-tests.gnumeric",
- "$samples/split-panes-tests.gnumeric",
- "$samples/string-tests.gnumeric",
- "$samples/merge-tests.gnumeric",
- "$samples/style-tests.gnumeric",
- "$samples/validation-tests.gnumeric",
- );
+my @sources = &GnumericTest::corpus();
+# xmllint hangs on these files. (Well, amath finishes but takes too
+# long.)
+ sources = grep { !m{(^|/)(amath|crlibm|gamma)\.gnumeric$} } @sources;
+
my $nskipped = 0;
my $ngood = 0;
my $nbad = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]