diff options
Diffstat (limited to 'tests/custom/04_bugs/28_null_equality')
-rw-r--r-- | tests/custom/04_bugs/28_null_equality | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/custom/04_bugs/28_null_equality b/tests/custom/04_bugs/28_null_equality new file mode 100644 index 0000000..b71a3b1 --- /dev/null +++ b/tests/custom/04_bugs/28_null_equality @@ -0,0 +1,31 @@ +When comparing `null` with another value for loose equality or inequality, +the values `0`, `0.0`, `false` and `"0x0"` (any string interpreted as +numeric null) were incorrectly treated as equal. + +-- Testcase -- +{{ null == 0 }} +{{ null == 0.0 }} +{{ null == false }} +{{ null == "0x0" }} +{{ null == null }} + +{{ null != 0 }} +{{ null != 0.0 }} +{{ null != false }} +{{ null != "0x0" }} +{{ null != null }} +-- End -- + +-- Expect stdout -- +false +false +false +false +true + +true +true +true +true +false +-- End -- |