summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-02-02 21:28:32 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2016-02-03 06:51:18 -0500
commit5f0f11d275ac5fb7c4790a5cd4c24746492c7349 (patch)
treeb3884cedf1ab4cfc4b2d65b2d5cb48972bbcbf79 /t
parent9d876b687d12d77fcb1012f1b865783476f00c7a (diff)
downloadperl-5f0f11d275ac5fb7c4790a5cd4c24746492c7349.tar.gz
Additional hexfp %a tests inspired by c95ea682.
If both plus and space are specified, the space is ignored.
Diffstat (limited to 't')
-rw-r--r--t/op/sprintf2.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t
index d03deb17b6..43ed919be5 100644
--- a/t/op/sprintf2.t
+++ b/t/op/sprintf2.t
@@ -55,6 +55,11 @@ if ($Config{nvsize} == 8 &&
[ '% a', ' 1', ' 0x1p+0' ],
[ '% a', '-1', '-0x1p+0' ],
+ [ '%+ a', '1', '+0x1p+0' ],
+ [ '%+ a', '-1', '-0x1p+0' ],
+ [ '% +a', ' 1', '+0x1p+0' ],
+ [ '% +a', '-1', '-0x1p+0' ],
+
[ '%8a', '3.14', '0x1.91eb851eb851fp+1' ],
[ '%13a', '3.14', '0x1.91eb851eb851fp+1' ],
[ '%20a', '3.14', '0x1.91eb851eb851fp+1' ],
@@ -112,6 +117,11 @@ if ($Config{nvsize} == 8 &&
[ '% a', ' 1', ' 0x8p-3' ],
[ '% a', '-1', '-0x8p-3' ],
+ [ '%+ a', '1', '+0x8p-3' ],
+ [ '%+ a', '-1', '-0x8p-3' ],
+ [ '% +a', ' 1', '+0x8p-3' ],
+ [ '% +a', '-1', '-0x8p-3' ],
+
[ '%8a', '3.14', '0xc.8f5c28f5c28f5c3p-2' ],
[ '%13a', '3.14', '0xc.8f5c28f5c28f5c3p-2' ],
[ '%20a', '3.14', '0xc.8f5c28f5c28f5c3p-2' ],
@@ -166,6 +176,11 @@ if ($Config{nvsize} == 8 &&
[ '% a', '1', ' 0x1p+0' ],
[ '% a', '-1', '-0x1p+0' ],
+ [ '%+ a', '1', '+0x1p+0' ],
+ [ '%+ a', '-1', '-0x1p+0' ],
+ [ '% +a', ' 1', '+0x1p+0' ],
+ [ '% +a', '-1', '-0x1p+0' ],
+
[ '%8a', '3.14', '0x1.91eb851eb851eb851eb851eb851fp+1' ],
[ '%13a', '3.14', '0x1.91eb851eb851eb851eb851eb851fp+1' ],
[ '%20a', '3.14', '0x1.91eb851eb851eb851eb851eb851fp+1' ],