HS test generator: pattern 2 captures me: from run() opts — +1 possessiveExpression

Pattern 2's `parse_run_locals` only looked for `, {locals: {...}}`. Tests
that pass `me:` directly (e.g. `run("my foo", { me: { foo: "foo" } })`)
got an empty locals list, so `my foo` lost its receiver and returned
nothing. Now `me:` (object/array/string/number literal) is also bound
as a local on top of any `locals: {}`.

possessiveExpression 18/23 → 19/23 ("can access my properties").
"can access its properties" still fails because the upstream test passes
`result:` rather than `it:` — appears to be an upstream typo we'd need
the runtime to special-case to fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 11:44:30 +00:00
parent 19f5bf7d72
commit adb06ed1fd
2 changed files with 12 additions and 6 deletions

View File

@@ -5707,7 +5707,7 @@
(dom-append (dom-body) _el-pDiv)
))
(deftest "can access my properties"
(assert= (eval-hs "my foo") "foo")
(assert= (eval-hs-locals "my foo" (list (list (quote me) {:foo "foo"}))) "foo")
)
(deftest "can access my style"
(hs-cleanup!)