HS: breakpoint parse tests (+2 tests)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1134,9 +1134,11 @@
|
||||
;; ── breakpoint (2 tests) ──
|
||||
(defsuite "hs-upstream-breakpoint"
|
||||
(deftest "parses as a top-level command"
|
||||
(error "SKIP (untranslated): parses as a top-level command"))
|
||||
(hs-compile "breakpoint")
|
||||
)
|
||||
(deftest "parses inside an event handler"
|
||||
(error "SKIP (untranslated): parses inside an event handler"))
|
||||
(hs-compile "on click breakpoint end")
|
||||
)
|
||||
)
|
||||
|
||||
;; ── call (6 tests) ──
|
||||
|
||||
@@ -2551,6 +2551,15 @@ def generate_eval_only_test(test, idx):
|
||||
hs_expr = extract_hs_expr(m.group(2))
|
||||
assertions.append(f' (assert-throws (fn () (eval-hs "{hs_expr}")))')
|
||||
|
||||
# Pattern 4: error("expr").toBeNull() — parsing/eval must not throw
|
||||
if not assertions:
|
||||
for m in re.finditer(
|
||||
r'error\((["\x27])(.+?)\1\).*?toBeNull\(\)',
|
||||
body, re.DOTALL
|
||||
):
|
||||
hs_expr = extract_hs_expr(m.group(2))
|
||||
assertions.append(f' (hs-compile "{hs_expr}")')
|
||||
|
||||
if not assertions:
|
||||
return None # Can't convert this body pattern
|
||||
|
||||
|
||||
Reference in New Issue
Block a user