diff options
author | Eric Wong <e@80x24.org> | 2023-06-08 18:26:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-06-09 09:21:29 +0000 |
commit | 516dc26c0f452b742600fa6ca189e479816ee5bb (patch) | |
tree | da8b59010093a9ab264b415dca8ce883acc65a46 /t/lei.t | |
parent | bc1162cf86828190805033ac74e45dd8eea73c33 (diff) | |
download | public-inbox-516dc26c0f452b742600fa6ca189e479816ee5bb.tar.gz |
Perl < 5.22 warned on newlines in the middle of a string instead of just the end. Workaround it by disabling all warnings on older Perls while running File::Path::mkpath.
Diffstat (limited to 't/lei.t')
-rw-r--r-- | t/lei.t | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -149,7 +149,10 @@ my $test_fail = sub { for my $lk (qw(ei inbox)) { my $d = "$home/newline\n$lk"; my $all = $lk eq 'ei' ? 'ALL' : 'all'; - File::Path::mkpath("$d/$all.git/objects"); + { # quiet newline warning on older Perls + local $^W = undef if $^V lt v5.22.0; + File::Path::mkpath("$d/$all.git/objects"); + } open my $fh, '>', "$d/$lk.lock" or BAIL_OUT "open $d/$lk.lock"; for my $fl (qw(-I --only)) { ok(!lei('q', $fl, $d, 'whatever'), |