Skip to content

Commit

Permalink
Add unit test for issue cpanel#158
Browse files Browse the repository at this point in the history
Add reproduction test for cpanel#158
  • Loading branch information
atoomic committed Feb 18, 2022
1 parent 5f48817 commit dafb2ed
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions t/issue-158-glob.t
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit dafb2ed

Please sign in to comment.