From 93b7cb3bf2dd9ae8d35c11cfd36dc14954045cd1 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 4 Jun 2012 19:01:56 +0200 Subject: [PATCH] Make several tests not check files multiple times via symlinks --- t/no-tabs.t | 3 ++- t/perl-syntax.t | 3 ++- t/portable-shell.t | 3 ++- t/quoted-strings.t | 3 ++- t/shell-syntax.t | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/t/no-tabs.t b/t/no-tabs.t index 284896c..6358605 100755 --- a/t/no-tabs.t +++ b/t/no-tabs.t @@ -29,8 +29,9 @@ sub checkFile # The file. my $file = $File::Find::name; - # We don't care about directories + # We don't care about directories or symbolic links return if ( ! -f $file ); + return if ( -l $file ); # Nor about backup files. return if ( $file =~ /~$/ ); diff --git a/t/perl-syntax.t b/t/perl-syntax.t index d9908db..698dd55 100755 --- a/t/perl-syntax.t +++ b/t/perl-syntax.t @@ -35,8 +35,9 @@ sub checkFile # The file. my $file = $File::Find::name; - # We don't care about directories + # We don't care about directories or symbolic links return if ( ! -f $file ); + return if ( -l $file ); # Nor about Makefiles return if ( $file =~ /\/Makefile$/ ); diff --git a/t/portable-shell.t b/t/portable-shell.t index 16e7fbe..aed25cd 100755 --- a/t/portable-shell.t +++ b/t/portable-shell.t @@ -37,8 +37,9 @@ sub checkFile # The file. my $file = $File::Find::name; - # We don't care about directories + # We don't care about directories or symbolic links return if ( ! -f $file ); + return if ( -l $file ); # We're only testing things beneath hooks return if ( $file !~ /hooks/ ); diff --git a/t/quoted-strings.t b/t/quoted-strings.t index 4063118..d6a655a 100755 --- a/t/quoted-strings.t +++ b/t/quoted-strings.t @@ -33,8 +33,9 @@ sub checkFile # The file. my $file = $File::Find::name; - # We don't care about directories + # We don't care about directories or symbolic links return if ( ! -f $file ); + return if ( -l $file ); # Finally mercurial files are fine. return if ( $file =~ /\.hg\// ); diff --git a/t/shell-syntax.t b/t/shell-syntax.t index 0c5b3dd..cb25f1c 100755 --- a/t/shell-syntax.t +++ b/t/shell-syntax.t @@ -31,8 +31,9 @@ sub checkFile # The file. my $file = $File::Find::name; - # We don't care about directories + # We don't care about directories or symbolic links return if ( ! -f $file ); + return if ( -l $file ); # We don't care about empty files return unless -s $file;