diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/custom/99_bugs/43_types_json_double_format | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/custom/99_bugs/43_types_json_double_format b/tests/custom/99_bugs/43_types_json_double_format new file mode 100644 index 0000000..9b90e37 --- /dev/null +++ b/tests/custom/99_bugs/43_types_json_double_format @@ -0,0 +1,24 @@ +When formatting integral double values as JSON, ensure that at least one +decimal place is retained. + +-- Testcase -- +printf("%.J\n", [ + 1e100, + 1.23, + 4.00, + 1.0/3*3, +]); +-- End -- + +-- Args -- +-R +-- End -- + +-- Expect stdout -- +[ + 1e+100, + 1.23, + 4.0, + 1.0 +] +-- End -- |