Skip to content

Commit

Permalink
be bug-compatible with Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
DrHyde committed Nov 25, 2021
1 parent d11ecb8 commit 9d43518
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile.PL
Expand Up @@ -11,7 +11,8 @@ WriteMakefile(
},
VERSION_FROM => 'lib/Tie/STDOUT.pm',
PREREQ_PM => {
File::Temp => 0,
Test::More => 0.88, # done_testing
Devel::CheckOS => 0,
File::Temp => 0,
Test::More => 0.88, # done_testing
}
);
7 changes: 5 additions & 2 deletions t/defaults.t
Expand Up @@ -6,19 +6,22 @@ use warnings;
use Test::More;

use Config;
use Devel::CheckOS qw(os_is);
use File::Temp;

local $/ = undef;

my $eol = os_is('MicrosoftWindows') ? "\r\n" : "\n";

test_fragment(
q{ print qq{foo\n}; print qq{bar\n}; },
"foo\nbar\n",
"foo${eol}bar${eol}",
"default 'print' works OK"
);

test_fragment(
q{ printf qq{%s %d\n}, qq{foo}, 20; },
"foo 20\n",
"foo 20${eol}",
"default 'printf' works OK"
);

Expand Down

0 comments on commit 9d43518

Please sign in to comment.