Skip to content

Commit d9bda2a

Browse files
haargkhwilliamson
authored andcommitted
t/corpus.t: for passing cases, use note not diag
diag outputs to STDERR and shouldn't be used for extra output in passing cases.
1 parent 6324b65 commit d9bda2a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

t/corpus.t

+9-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ my(@testfiles, %xmlfiles, %wouldxml);
2323
#use Pod::Simple::Debug (10);
2424
BEGIN {
2525
my $corpusdir = File::Spec->catdir(File::Basename::dirname(Cwd::abs_path(__FILE__)), 'corpus');
26-
diag "Corpusdir: $corpusdir";
26+
note "Corpusdir: $corpusdir";
2727

2828
opendir(my $indir, $corpusdir) or die "Can't opendir $corpusdir : $!";
2929
my @f = map File::Spec::->catfile($corpusdir, $_), readdir($indir);
@@ -56,20 +56,20 @@ my $HACK = 0;
5656

5757
{
5858
my @x = @testfiles;
59-
diag "Files to test:";
60-
while(@x) { diag " ", join(' ', splice @x,0,3); }
59+
note "Files to test:";
60+
while(@x) { note " ", join(' ', splice @x,0,3); }
6161
}
6262

6363
require Pod::Simple::DumpAsXML;
6464

6565

6666
foreach my $f (@testfiles) {
6767
my $xml = $xmlfiles{$f};
68-
diag "";
68+
note "";
6969
if($xml) {
70-
diag "To test $f against $xml";
70+
note "To test $f against $xml";
7171
} else {
72-
diag "$f has no xml to test it against";
72+
note "$f has no xml to test it against";
7373
}
7474

7575
my $outstring;
@@ -101,7 +101,7 @@ foreach my $f (@testfiles) {
101101
close($out);
102102
}
103103
unless($xml) {
104-
diag " (no comparison done)";
104+
note " (no comparison done)";
105105
ok 1;
106106
next;
107107
}
@@ -112,12 +112,12 @@ foreach my $f (@testfiles) {
112112
my $xmlsource = <$in>;
113113
close($in);
114114

115-
diag "There's errata!" if $outstring =~ m/start_line="-321"/;
115+
note "There's errata!" if $outstring =~ m/start_line="-321"/;
116116

117117
$xmlsource =~ s/[\n\r]+/\n/g;
118118
$outstring =~ s/[\n\r]+/\n/g;
119119
if($xmlsource eq $outstring) {
120-
diag " (Perfect match to $xml)";
120+
note " (Perfect match to $xml)";
121121
unlink $outfilename if $HACK == 1;
122122
ok 1;
123123
next;

0 commit comments

Comments
 (0)