X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/7fddb138e6bbaa0efbb2096d3d3cc5a0ee34d546..4d88a840da7e1443b8de7e08e084c6063ded18b6:/ext/File-DosGlob/t/DosGlob.t?ds=sidebyside diff --git a/ext/File-DosGlob/t/DosGlob.t b/ext/File-DosGlob/t/DosGlob.t index b3302b8..600b87a 100644 --- a/ext/File-DosGlob/t/DosGlob.t +++ b/ext/File-DosGlob/t/DosGlob.t @@ -10,7 +10,7 @@ use File::DosGlob; use FindBin; use File::Spec::Functions; BEGIN { - chdir catfile $FindBin::Bin, (updir)x3, 't'; + chdir catdir $FindBin::Bin, (updir)x3, 't'; @INC = '../lib'; } @@ -147,9 +147,10 @@ SKIP: { # Use a random number of ops, so that the glob op does not reuse the # same address each time, giving us false passes. my($count,$count2); - eval '$x+'x(rand() * 100) . '<*>'; + eval '$x+'x(1+rand() * 100) . '<*>'; $count = sv_count(); - eval '$x+'x(rand() * 100) . '<*>'; + eval '$x+'x(1+rand() * 100) . '<*>'; $count2 = sv_count(); - is $count2, $count, 'no leak when partly iterated caller is freed'; + cmp_ok $count2, '<=', $count, + 'no leak when partly iterated caller is freed'; }