2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 &message
("Check that the gnumeric exporter produces valid files.");
10 my $schema = "$topsrc/gnumeric.xsd";
11 &GnumericTest
::report_skip
("Cannot find schema") unless -r
$schema;
13 my $xmllint = &GnumericTest
::find_program
("xmllint");
15 my @sources = &GnumericTest
::corpus
();
21 foreach my $src (@sources) {
27 print STDERR
"Checking $src\n";
32 &GnumericTest
::junkfile
($tmp);
33 system ("$ssconvert $src $tmp");
35 print STDERR
"ssconvert failed to produce $tmp\n";
39 my $out = `$xmllint --noout --schema $schema $tmp 2>&1`;
40 if ($out !~ /validates$/) {
41 print STDERR
"While checking $tmp:\n";
42 &GnumericTest
::dump_indented
($out);
48 &GnumericTest
::removejunk
($tmp);
51 &GnumericTest
::report_skip
("No source files present") if $nbad + $ngood == 0;
54 print STDERR
"$nskipped files skipped.\n";
60 print STDERR
"Pass\n";