Initial commit of the lib/js/ tree and plans/ directory. A previous session left template-string work in progress — 278/280 unit tests pass (2 failing: tpl part-count off-by-one, escaped-backtick ident lookup). test262-runner.py and scoreboard are placeholders (0/8 with 7 timeouts); fixing the runner is the next queue item.
1.1 KiB
1.1 KiB
JS-on-SX cherry-picked conformance slice
A hand-picked slice inspired by test262 expression tests. Each test is one
JS expression in a .js file, paired with an .expected file containing
the SX-printed result that js-eval should produce.
Run via:
bash lib/js/conformance.sh
The slice intentionally avoids anything not yet implemented (statements,
var/let, function, regex, template strings, prototypes, new,
this, classes, async). Those land in later phases.
Expected value format
js-eval returns SX values. The epoch protocol prints them thus:
| JS value | Expected file contents |
|---|---|
42 |
42 |
3.14 |
3.14 |
true / false |
true / false |
"hi" |
"hi" |
null |
nil |
undefined |
"js-undefined" |
[1,2,3] |
(1 2 3) |
{} |
{} |
The runner does a substring match — the .expected file can contain just
the distinguishing part of the result.