[gnumeric] test: syntax check the drawings files too.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] test: syntax check the drawings files too.
- Date: Wed, 21 Jan 2015 16:50:46 +0000 (UTC)
commit 1c144637ef961c388c7e094011d1374eb54a07c5
Author: Morten Welinder <terra gnome org>
Date: Wed Jan 21 11:50:02 2015 -0500
test: syntax check the drawings files too.
test/t6152-xlsx-syntax.pl | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/test/t6152-xlsx-syntax.pl b/test/t6152-xlsx-syntax.pl
index 0405419..200279f 100755
--- a/test/t6152-xlsx-syntax.pl
+++ b/test/t6152-xlsx-syntax.pl
@@ -20,6 +20,12 @@ if (!-r $chart_schema) {
&message ("Schema $chart_schema not found");
$chart_schema = undef;
}
+my $drawing_schema = "$topsrc/test/ooxml-schema/dml-spreadsheetDrawing.xsd";
+if (!-r $drawing_schema) {
+ &message ("Schema $drawing_schema not found");
+ $drawing_schema = undef;
+}
+
my $xmllint = &GnumericTest::find_program ("xmllint");
my $unzip = &GnumericTest::find_program ("unzip");
@@ -86,7 +92,10 @@ my $nbad = 0;
my $checker = "$xmllint --noout" . ($schema ? " --schema $schema" : "");
my $chart_checker = "$xmllint --noout" . ($chart_schema ? " --schema $chart_schema" : "");
-my %checkers = ( 0 => $checker, 1 => $chart_checker );
+my $drawing_checker = "$xmllint --noout" . ($drawing_schema ? " --schema $drawing_schema" : "");
+my %checkers = ( 0 => $checker,
+ 1 => $chart_checker,
+ 2 => $drawing_checker);
foreach my $src (@sources) {
if (!-r $src) {
@@ -123,12 +132,15 @@ foreach my $src (@sources) {
foreach my $member (sort keys %members) {
push @check_members, [$member,0] if $member =~ m{^xl/worksheets/sheet\d+\.xml$};
push @check_members, [$member,1] if $member =~ m{^xl/charts/chart\d+\.xml$};
+ push @check_members, [$member,2] if $member =~ m{^xl/drawings/drawing\d+\.xml$};
}
for (@check_members) {
my ($member,$typ) = @$_;
my $this_checker = $checkers{$typ};
- my $out = `$unzip -p $tmp $member | $this_checker - 2>&1`;
+ my $cmd = "$unzip -p $tmp $member | $this_checker";
+ print STDERR "# $cmd\n" if $GnumericTest::verbose;
+ my $out = `$cmd - 2>&1`;
if ($out ne '' && $out !~ /validates$/) {
print STDERR "While checking $member from $tmp:\n";
&GnumericTest::dump_indented ($out);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]