2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 &message
("Check that the gnumeric exporter produces the same results every time.");
10 my $format = "Gnumeric_XmlIO:sax:0";
12 my @sources = &GnumericTest
::corpus
();
13 # datefuns and docs-samples use NOW()
14 @sources = grep { !m{(^|/)(datefuns\.xls|docs-samples\.gnumeric)$} } @sources;
20 foreach my $src (@sources) {
26 print STDERR
"Checking $src\n";
29 foreach my $i (1, 2) {
32 $tmp =~ s
|\
..*|-$i.gnumeric
|;
33 &GnumericTest
::junkfile
($tmp);
34 my $cmd = "$ssconvert -T $format $src $tmp";
35 print STDERR
"# $cmd\n" if $GnumericTest::verbose
;
38 print STDERR
"ssconvert failed to produce $tmp\n";
42 my $d = &GnumericTest
::read_file
($tmp);
44 # Some formats (notably mps) set this to current time.
45 $d =~ s{<meta:creation-date>[0-9-:TZ]+</meta:creation-date>}{};
48 &GnumericTest
::removejunk
($tmp);
51 if ($data[0] ne $data[1]) {
52 print STDERR
"Generated output for $src is not deterministic.\n";
59 &GnumericTest
::report_skip
("No source files present") if $nbad + $ngood == 0;
62 print STDERR
"$nskipped files skipped.\n";
68 print STDERR
"Pass\n";