diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-07-17 23:21:03 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-07-30 13:46:23 +0200 |
commit | 10e056d3744384a029f05de5903c489898722fc3 (patch) | |
tree | e6621194f1053fdc314dfee02358972028a6a5ff /tests/custom/99_bugs/28_null_equality | |
parent | 862e49de33bd07daea129d553968579019c79b59 (diff) |
compiler: add support for import/export statements
This commit introduces syntax level support for ES6 style module import
and export statements. Imports are resolved at compile time and the
corresponding module code is compiled into the main program.
Also add testcases to cover import and export statement semantics.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/99_bugs/28_null_equality')
-rw-r--r-- | tests/custom/99_bugs/28_null_equality | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/custom/99_bugs/28_null_equality b/tests/custom/99_bugs/28_null_equality new file mode 100644 index 0000000..b71a3b1 --- /dev/null +++ b/tests/custom/99_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 -- |