X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/7ee537e6b26d5ad4b6fccdd5746419494a9a6add..4755cf0153b43de3331f3442033278c6151cb5e8:/t/op/sprintf2.t?ds=sidebyside diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t index a898df1..6aa994c 100644 --- a/t/op/sprintf2.t +++ b/t/op/sprintf2.t @@ -243,7 +243,7 @@ if ($Config{nvsize} == 8 && print "# no hexfloat tests\n"; } -plan tests => 1408 + ($Q ? 0 : 12) + @hexfloat + 6; +plan tests => 1408 + ($Q ? 0 : 12) + @hexfloat + 8; use strict; use Config; @@ -677,3 +677,10 @@ SKIP: { like(sprintf("%La\n", (2**1023) + (2**-1074)), qr/^0x1.0{524}8p\+1023$/); } + +SKIP: { + skip("negative zero not available\n", 2) + unless sprintf('%+f', -0.0) =~ /^-0/; + is(sprintf("%a", -0.0), "-0x0p+0", "negative zero"); + is(sprintf("%+a", -0.0), "-0x0p+0", "negative zero"); +}