From 4eeabb9472f76b4b0526b4bc47ba3338c251145d Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 1 Aug 2002 12:53:46 +0000 Subject: ChangeLogTag: Thu Aug 01 14:52:12 2002 Johnny Willemsen --- bin/fuzz.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin/fuzz.pl') 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 () { - 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); -- cgit v1.2.1