Skip to content

Commit

Permalink
Make 'temp' name checking more succinct
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Max Maischein authored and khwilliamson committed Feb 3, 2024
1 parent 35793d2 commit f6c4e5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/JustPod_corpus.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BEGIN {
use File::Find;
use File::Spec;
use Test::More;
use File::Basename;

use Pod::Simple::JustPod;

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

0 comments on commit f6c4e5d

Please sign in to comment.