From 1e7d3a8ef337e63901848b23009e78b8e13b2808 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Wed, 5 May 2021 22:40:21 +0100 Subject: [PATCH] more random prodding --- Makefile.PL | 1 + t/all.t | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 21cc1e8..eda457f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -17,6 +17,7 @@ WriteMakefile( 'Test::More' => 0.96, 'Devel::Peek' => 0, 'Capture::Tiny' => 0, + 'Devel::CheckOS' => 0, }, realclean => { FILES => "_Inline" diff --git a/t/all.t b/t/all.t index f515ad2..50892ef 100644 --- a/t/all.t +++ b/t/all.t @@ -7,6 +7,7 @@ use Test::More; use Scalar::Type qw(is_* type); use B; use Capture::Tiny qw(capture_stderr); +use Devel::CheckOS qw(os_is); use Devel::Peek; subtest "is_integer" => sub { @@ -96,7 +97,7 @@ subtest "string subsequently used as an int or float" => sub { $foo < 8; ok($foo eq '007', "after being treated as an int it still has its original value"); is(type($foo), 'SCALAR', "and it's not become an integer as far as we're concerned"); - note(capture_stderr { Dump($foo) }); + note(capture_stderr { Dump($foo) }) unless(os_is('MicrosoftWindows')); }; subtest "'007.5'" => sub { @@ -104,14 +105,14 @@ subtest "string subsequently used as an int or float" => sub { $foo + 0.5; ok($foo eq '007.5', "after being treated as a float it still has its original value"); is(type($foo), 'SCALAR', "and it's not become a float as far as we're concerned"); - note(capture_stderr { Dump($foo) }); + note(capture_stderr { Dump($foo) }) unless(os_is('MicrosoftWindows')); }; subtest "'7'" => sub { my $foo = '7'; $foo < 8; is(type($foo), 'INTEGER', "this does become an int after a numeric operation"); - note(capture_stderr { Dump($foo) }); + note(capture_stderr { Dump($foo) }) unless(os_is('MicrosoftWindows')); }; }; @@ -130,7 +131,7 @@ subtest "are we checking the flags, not just the contents of the IV/NV slots?" = ok(!is_integer($foo), 'variable is no longer an int after a string was assigned to it'); ok(!is_number($foo), '... no longer a number either'); note("still says 42 in the IV slot, but IOK isn't set"); - note(capture_stderr { Dump($foo) }); + note(capture_stderr { Dump($foo) }) unless(os_is('MicrosoftWindows')); $foo = 3.14; ok(!is_integer($foo), 'variable containing 3.14 is not an integer');