summaryrefslogtreecommitdiff
path: root/tests/nroff-scan.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-08-14 17:48:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-08-15 00:10:36 +0200
commit86dc9867a56eb2232e88bf95a8834fa73d6383c8 (patch)
tree3846b2c63f8536d4902b99cd6cbc141be2e6598b /tests/nroff-scan.pl
parentd68fc029721920a4bac4c75b3c5a8e370e86eddf (diff)
downloadcurl-86dc9867a56eb2232e88bf95a8834fa73d6383c8.tar.gz
test1140: compare stdout
To make problems more immediately obvious when tests fail. Closes #5814
Diffstat (limited to 'tests/nroff-scan.pl')
-rwxr-xr-xtests/nroff-scan.pl12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/nroff-scan.pl b/tests/nroff-scan.pl
index 3df778a73..15a59c9b0 100755
--- a/tests/nroff-scan.pl
+++ b/tests/nroff-scan.pl
@@ -63,23 +63,23 @@ sub file {
while($l =~ s/\\f(.)([^ ]*)\\f(.)//) {
my ($pre, $str, $post)=($1, $2, $3);
if($post ne "P") {
- print STDERR "error: $f:$line: missing \\fP after $str\n";
+ print "error: $f:$line: missing \\fP after $str\n";
$errors++;
}
if($str =~ /((libcurl|curl)([^ ]*))\(3\)/i) {
my $man = "$1.3";
if(!manpresent($man)) {
- print STDERR "error: $f:$line: referring to non-existing man page $man\n";
+ print "error: $f:$line: referring to non-existing man page $man\n";
$errors++;
}
if($pre ne "I") {
- print STDERR "error: $f:$line: use \\fI before $str\n";
+ print "error: $f:$line: use \\fI before $str\n";
$errors++;
}
}
}
if($l =~ /(curl([^ ]*)\(3\))/i) {
- print STDERR "error: $f:$line: non-referencing $1\n";
+ print "error: $f:$line: non-referencing $1\n";
$errors++;
}
if($l =~ /^\.BR (.*)/) {
@@ -87,7 +87,7 @@ sub file {
while($i =~ s/((lib|)curl([^ ]*)) *\"\(3\)(,|) *\" *//i ) {
my $man = "$1.3";
if(!manpresent($man)) {
- print STDERR "error: $f:$line: referring to non-existing man page $man\n";
+ print "error: $f:$line: referring to non-existing man page $man\n";
$errors++;
}
}
@@ -101,4 +101,6 @@ foreach my $f (@f) {
file($f);
}
+print "OK\n" if(!$errors);
+
exit $errors?1:0;