summaryrefslogtreecommitdiff
path: root/bin/fuzz.pl
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2002-08-01 12:53:46 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2002-08-01 12:53:46 +0000
commit4eeabb9472f76b4b0526b4bc47ba3338c251145d (patch)
tree6f7a52596bbb4c930a03c94899789c9c8e534945 /bin/fuzz.pl
parent7a849fa2cf9f94c98bfe132c04c6e2f2f1706adc (diff)
downloadATCD-4eeabb9472f76b4b0526b4bc47ba3338c251145d.tar.gz
ChangeLogTag: Thu Aug 01 14:52:12 2002 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'bin/fuzz.pl')
-rwxr-xr-xbin/fuzz.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/fuzz.pl b/bin/fuzz.pl
index c2fefb0fd15..4a17d9370dd 100755
--- a/bin/fuzz.pl
+++ b/bin/fuzz.pl
@@ -7,6 +7,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# easy to spot (by a perl script, at least) problems.
use File::Find;
+use File::Basename;
use Getopt::Std;
###### TODO
@@ -467,8 +468,15 @@ sub check_for_mismatched_filename ()
my $disable = 0;
print "Looking at file $file\n" if $opt_d;
while (<FILE>) {
- if (m/\@file\s*([^\s]*)/ && $file !~ m/$1$/) {
- print_error ("\@file mismatch in $file");
+ if (m/\@file\s*([^\s]*)/){
+ # $file includes complete path, $1 is the name after
+ # @file. We must strip the complete path from $file.
+ # we do that using the basename function from
+ # File::BaseName
+ $filename = basename($file,"");
+ if (!($filename eq $1)){
+ print_error ("\@file mismatch in $file, found $1");
+ }
}
}
close (FILE);