diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-10-19 17:50:22 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-10-19 17:56:05 -0400 |
commit | 6dcbb4af1832360387c3d6908d0265883509b607 (patch) | |
tree | f570b4c8c3081bcbe38eb8719703cc407a51068b | |
parent | 1d850a6a2204e3393ca4fda2edf9f4b515e06368 (diff) | |
download | perl-6dcbb4af1832360387c3d6908d0265883509b607.tar.gz |
/tmp can have (low) quotas on the number of files.
/tmp, or wherever tempdir happens.
Happened in IRIX, but applicable anywhere.
-rw-r--r-- | ext/File-Glob/t/rt114984.t | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/ext/File-Glob/t/rt114984.t b/ext/File-Glob/t/rt114984.t index 285bb70e95..e53234b0aa 100644 --- a/ext/File-Glob/t/rt114984.t +++ b/ext/File-Glob/t/rt114984.t @@ -16,16 +16,27 @@ my @mp = (1000..1205); my $path = tempdir uc cleanup => 1; +my $md = 0; +my $mp = 0; + foreach (@md) { - open(my $f, ">", catfile $path, "md_$_.dat"); - close $f; + if (open(my $f, ">", catfile $path, "md_$_.dat")) { + $md++; + close $f; + } } foreach (@mp) { - open(my $f, ">", catfile $path, "mp_$_.dat"); - close $f; + if (open(my $f, ">", catfile $path, "mp_$_.dat")) { + $mp++; + close $f; + } } my @b = glob(qq{$path/mp_[0123456789]*.dat $path/md_[0123456789]*.dat}); -is scalar(@b), @md+@mp, +if ($md+$mp < @md+@mp) { + warn sprintf("$0: expected to create %d files, created only %d (path $path)\n", + @md+@mp, $md+$mp); +} +is scalar(@b), $md+$mp, 'File::Glob extends the stack when returning a long list'; |