You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case Test::MockFile is loaded in no strict mode but unused...
it's corrupting the output from glob...
#!perluse strict;
use warnings;
use Test2::Bundle::Extended;
use Test2::Tools::Explain;
use Test2::Plugin::NoWarnings;
use File::Temp;
use Test::MockFile qw< nostrict >; # comment this line to get the expected behaviormy$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;
Output
╰─> prove -v t/glob-issue.t
t/glob-issue.t ..
# Seeded srand with seed '20220218' from local date.
not ok 1
1..1
# Failed test at t/glob-issue.t line 23.
# +------+------------------+--------------------------+
# | PATH | GOT | CHECK |
# +------+------------------+--------------------------+
# | [0] | <DOES NOT EXIST> | /tmp/b0uZlOrzfq/file.log |
# +------+------------------+--------------------------+
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
Test Summary Report
-------------------
t/glob-issue.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.14 cusr 0.01 csys = 0.19 CPU)
Result: FAIL
The text was updated successfully, but these errors were encountered:
atoomic
added a commit
to atoomic/Test-MockFile
that referenced
this issue
Feb 18, 2022
In this case
Test::MockFile
is loaded inno strict
mode but unused...it's corrupting the output from glob...
Output
The text was updated successfully, but these errors were encountered: