Skip to content

Commit

Permalink
[rt.perl.org #128889]: printf %a mishandles negative pseudo-precision
Browse files Browse the repository at this point in the history
(the fix for [rt.perl.org #128888] fixed also this one)
  • Loading branch information
jhi committed Aug 11, 2016
1 parent 82229f9 commit a9ce335
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/op/sprintf2.t
Expand Up @@ -262,7 +262,7 @@ if ($Config{nvsize} == 8 &&
print "# no hexfloat tests\n";
}

plan tests => 1408 + ($Q ? 0 : 12) + @hexfloat + 40;
plan tests => 1408 + ($Q ? 0 : 12) + @hexfloat + 41;

use strict;
use Config;
Expand Down Expand Up @@ -807,3 +807,6 @@ SKIP: {
is(sprintf("%a", 1.03125), "0x1.08p+0");
is(sprintf("%.1a", 1.03125), "0x1.0p+0");
is(sprintf("%.0a", 1.03125), "0x1p+0", "[rt.perl.org #128888]");

# [rt.perl.org #128889]
is(sprintf("%.*a", -1, 1.03125), "0x1.08p+0", "[rt.perl.org #128889]");

0 comments on commit a9ce335

Please sign in to comment.