summaryrefslogtreecommitdiff
path: root/t/pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-17 06:19:17 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-17 06:19:17 +0000
commit564d657a74dccde9ba1d290e8c73ec113622ee81 (patch)
treecc6d1f76bccc7ac68ebd8a0c2d144aadb433251e /t/pod
parenta57ec3bdcb98fc06a1394f7189e7b71cb95e9732 (diff)
downloadperl-564d657a74dccde9ba1d290e8c73ec113622ee81.tar.gz
PodParser v1.13 update (from Brad Appleton)
p4raw-id: //depot/perl@5781
Diffstat (limited to 't/pod')
-rw-r--r--t/pod/testpchk.pl16
1 files changed, 5 insertions, 11 deletions
diff --git a/t/pod/testpchk.pl b/t/pod/testpchk.pl
index 94c0c10fe5..8aa10b94f8 100644
--- a/t/pod/testpchk.pl
+++ b/t/pod/testpchk.pl
@@ -34,18 +34,12 @@ sub msgcmp( $ $ ) {
## filter out platform-dependent aspects of error messages
my ($line1, $line2) = @_;
for ($line1, $line2) {
- if ( /^#*\s*(\S.*?)\s+(?:has \d+\s*)?pod syntax (?:error|OK)/ ) {
- my $fname = $1;
- s/^#*\s*// if ($^O eq 'MacOS');
- s/^\s*\Q$fname\E/stripname($fname)/e;
- }
- elsif ( /^#*\s*\*+\s*(?:ERROR|Unterminated)/ ) {
- s/^#*\s*// if ($^O eq 'MacOS');
- s/of file\s+(\S.*?)\s*$/"of file ".stripname($1)/e;
- s/at\s+(\S.*?)\s+line/"at ".stripname($1)." line"/e;
- }
+ ## remove filenames from error messages to avoid any
+ ## filepath naming differences between OS platforms
+ s/(at line \S+ in file) .*\W(\w+\.[tT])\s*$/$1 \L$2\E/;
+ s/.*\W(\w+\.[tT]) (has \d+ pod syntax error)/\L$1\E $2/;
}
- return $line1 ne $line2;
+ return ($line1 ne $line2);
}
sub testpodcheck( @ ) {