2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 $GnumericTest::default_corpus
= 'random:5';
10 &message
("Check the ods importer/exporter with valgrind.");
12 my $xmllint = &GnumericTest
::find_program
("xmllint");
13 my $unzip = &GnumericTest
::find_program
("unzip");
15 my $format = "Gnumeric_OpenCalc:odf";
17 my @sources = &GnumericTest
::corpus
();
22 foreach my $src (@sources) {
28 my $basename = &File
::Basename
::fileparse
($src);
29 my $basenoext = $basename;
30 $basenoext =~ s/\.[^.]+$//;
32 my $tmp1 = "$basenoext-tmp.ods";
33 print STDERR
"$basename -> $tmp1\n";
34 &GnumericTest
::junkfile
($tmp1);
35 my $cmd = &GnumericTest
::quotearg
($ssconvert, "-T", $format, $src, $tmp1);
36 my $err = &test_valgrind
($cmd, 1, 1);
38 if (!$err && $basename !~ /\.ods$/) {
39 my $tmp2 = "$basenoext-tmp.gnumeric";
40 print STDERR
"$tmp1 -> $tmp2\n";
41 &GnumericTest
::junkfile
($tmp2);
43 my $cmd = &GnumericTest
::quotearg
($ssconvert, $tmp1, $tmp2);
44 $err = &test_valgrind
($cmd, 1, 1);
45 &GnumericTest
::removejunk
($tmp2);
48 $err ?
$nbad++ : $ngood++;
49 &GnumericTest
::removejunk
($tmp1);
52 &GnumericTest
::report_skip
("No source files present") if $nbad + $ngood == 0;
55 print STDERR
"$nskipped files skipped.\n";
61 print STDERR
"Pass\n";
64 # -----------------------------------------------------------------------------