diff options
Diffstat (limited to 'tests/custom/99_bugs/29_empty_string_as_number')
-rw-r--r-- | tests/custom/99_bugs/29_empty_string_as_number | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/custom/99_bugs/29_empty_string_as_number b/tests/custom/99_bugs/29_empty_string_as_number new file mode 100644 index 0000000..51a93b2 --- /dev/null +++ b/tests/custom/99_bugs/29_empty_string_as_number @@ -0,0 +1,15 @@ +When an empty string was explicitly casted to a number through `+` or +implicitly through numerical calculations, it was incorrectly treated +as `NaN` and not `0`. + +-- Testcase -- +{{ +"" }} +{{ "" + 0 }} +{{ "" - 0.0 }} +-- End -- + +-- Expect stdout -- +0 +0 +0 +-- End -- |