From dafb2edd9d7a81bf94b0d53c8d7611f56f6ec880 Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Fri, 18 Feb 2022 17:00:26 -0600 Subject: [PATCH] Add unit test for issue #158 Add reproduction test for #158 --- t/issue-158-glob.t | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 t/issue-158-glob.t diff --git a/t/issue-158-glob.t b/t/issue-158-glob.t new file mode 100644 index 0000000..c2c15b3 --- /dev/null +++ b/t/issue-158-glob.t @@ -0,0 +1,25 @@ +#!perl + +use strict; +use warnings; + +use Test2::Bundle::Extended; +use Test2::Tools::Explain; +use Test2::Plugin::NoWarnings; + +use File::Temp; + +use Test::MockFile qw< nostrict >; + +my $dir = File::Temp->newdir; + +my $log_file = "$dir/file.log"; + +open( my $fh, '>', $log_file ); +print {$fh} "..."; +close $fh; + +my @logs = glob "$dir/*.log"; +is \@logs, [$log_file]; + +done_testing;