2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 &message
("Check ssdiff's highlight mode");
10 my $tmp = "junk.gnumeric";
11 &GnumericTest
::junkfile
($tmp);
13 my @sources = &GnumericTest
::corpus
();
17 @sources = grep { -r
$_ ?
1 : ($nskipped++, 0) } @sources;
18 while (@sources >= 2) {
19 my $first = shift @sources;
20 my $second = shift @sources;
21 push @pairs, [$first,$second];
27 my ($first,$second) = @
$p;
29 print STDERR
"$first vs $second...\n";
31 my $cmd = "$ssdiff --highlight --output=$tmp $first $second";
32 print STDERR
"$cmd\n" if $GnumericTest::verbose
;
33 my $output = `$cmd 2>&1`;
35 if ($err == (1 << 8)) {
36 &GnumericTest
::dump_indented
($output);
39 &GnumericTest
::dump_indented
($output || '(no output)');
41 die "Failed command: $cmd [$err]\n" if $err > (1 << 8);
45 &GnumericTest
::report_skip
("No source files present") if $nbad + $ngood == 0;
48 print STDERR
"$nskipped files skipped.\n";
54 print STDERR
"Pass\n";