php-src/ext/standard/tests/strings/bug26973.phpt
Brian Shire 55b5b89ef7 fix sprintf/printf %u tests so they work correctly on both 32-bit and 64-bit. (broken in previous fix)
# just made these EXPECTREGEX expressions, if there's a prefered way to comply with both 32/64 bit let me know.
2007-06-04 01:23:07 +00:00

35 lines
556 B
PHP

--TEST--
Bug #26973 (*printf() '+' modifier problem)
--FILE--
<?php
printf("%+05d\n", 200);
printf("%+05d\n", -200);
printf("%+05f\n", 200);
printf("%+05f\n", -200);
printf("%+05u\n", 200);
printf("%+05u\n", -200);
echo "---\n";
printf("%05d\n", 200);
printf("%05d\n", -200);
printf("%05f\n", 200);
printf("%05f\n", -200);
printf("%05u\n", 200);
printf("%05u\n", -200);
?>
--EXPECTREGEX--
\+0200
\-0200
\+200\.000000
\-200\.000000
00200
(4294967096|18446744073709551416)
---
00200
\-0200
200\.000000
\-200\.000000
00200
(4294967096|18446744073709551416)