Skip to content

Commit f6c4e5d

Browse files
Max Maischeinkhwilliamson
authored andcommitted
Make 'temp' name checking more succinct
Previously, testing Pod::Simple in a directory /tmp/temp/pod-simple would fail due to the overbroad check for temporary files left over by other test scripts.
1 parent 35793d2 commit f6c4e5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/JustPod_corpus.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ BEGIN {
1313
use File::Find;
1414
use File::Spec;
1515
use Test::More;
16+
use File::Basename;
1617

1718
use Pod::Simple::JustPod;
1819

@@ -26,7 +27,7 @@ BEGIN {
2627
sub wanted {
2728
push @test_files, $File::Find::name
2829
if $File::Find::name =~ /\.pod$/
29-
&& $File::Find::name !~ /temp/; # ignore any files named temp,
30+
&& basename($File::Find::name) !~ /temp/; # ignore any files named temp,
3031
# a different test file may have
3132
# created it
3233
}

0 commit comments

Comments
 (0)