Skip to content

Commit 04db537

Browse files
author
Ilia Alshanetsky
committed
Added tests for %e & %E
1 parent 95312e9 commit 04db537

File tree

1 file changed

+10
-0
lines changed
  • ext/standard/tests/general_functions

1 file changed

+10
-0
lines changed

ext/standard/tests/general_functions/001.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ if ($test == "003333.33") {
4848

4949
echo sprintf("%.2f\n", "99.00");
5050
echo sprintf("%.2f\n", 99.00);
51+
52+
echo sprintf("%e\n", 1.234E-18);
53+
echo sprintf("%e\n", 1.234E+18);
54+
echo sprintf("%e\n", 9843243.12);
55+
echo sprintf("%e\n", -9843243.12);
56+
5157
?>
5258
--EXPECT--
5359
sprintf string truncate test: passed
@@ -57,3 +63,7 @@ sprintf octal binary test: passed
5763
sprintf float test: passed
5864
99.00
5965
99.00
66+
1.23400e-18
67+
1.23400e+18
68+
9.84324e+6
69+
-9.84324e+6

0 commit comments

Comments
 (0)