2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 &message
("Check ssdiff's xml mode");
10 my $xmllint = &GnumericTest
::find_program
("xmllint");
12 my @sources = &GnumericTest
::corpus
();
16 @sources = grep { -r
$_ ?
1 : ($nskipped++, 0) } @sources;
17 while (@sources >= 2) {
18 my $first = shift @sources;
19 my $second = shift @sources;
20 push @pairs, [$first,$second];
26 my ($first,$second) = @
$p;
28 print STDERR
"$first vs $second...\n";
30 my $cmd = "$ssdiff --xml $first $second | $xmllint --nonet --noout - 2>&1";
31 print STDERR
"$cmd\n" if $GnumericTest::verbose
;
32 my $output = `$cmd 2>&1`;
33 my $err = $?
; # from xmllint
35 &GnumericTest
::dump_indented
($output || '(no output)');
37 die "Failed command: $cmd [$err]\n" if $err > (1 << 8);
42 &GnumericTest
::dump_indented
($output);
48 &GnumericTest
::report_skip
("No source files present") if $nbad + $ngood == 0;
51 print STDERR
"$nskipped files skipped.\n";
57 print STDERR
"Pass\n";