2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 $GnumericTest::default_corpus
= 'random:5';
10 &message
("Check the xlsx importer/exporter with valgrind.");
12 my $unzip = &GnumericTest
::find_program
("unzip");
14 my $format = "Gnumeric_Excel:xlsx";
16 my @sources = &GnumericTest
::corpus
();
21 foreach my $src (@sources) {
27 my $basename = &File
::Basename
::fileparse
($src);
28 my $basenoext = $basename;
29 $basenoext =~ s/\.[^.]+$//;
31 my $tmp1 = "$basenoext-tmp.xlsx";
32 print STDERR
"$basename -> $tmp1\n";
33 &GnumericTest
::junkfile
($tmp1);
34 my $cmd = &GnumericTest
::quotearg
($ssconvert, "-T", $format, $src, $tmp1);
35 my $err = &test_valgrind
($cmd, 1, 1);
37 if (!$err && $basename !~ /\.xlsx$/) {
38 my $tmp2 = "$basenoext-tmp.gnumeric";
39 print STDERR
"$tmp1 -> $tmp2\n";
40 &GnumericTest
::junkfile
($tmp2);
42 my $cmd = &GnumericTest
::quotearg
($ssconvert, $tmp1, $tmp2);
43 $err = &test_valgrind
($cmd, 1, 1);
44 &GnumericTest
::removejunk
($tmp2);
47 $err ?
$nbad++ : $ngood++;
48 &GnumericTest
::removejunk
($tmp1);
51 &GnumericTest
::report_skip
("No source files present") if $nbad + $ngood == 0;
54 print STDERR
"$nskipped files skipped.\n";
60 print STDERR
"Pass\n";
63 # -----------------------------------------------------------------------------