diff --git a/hosts/ocaml/bin/run_tests.ml b/hosts/ocaml/bin/run_tests.ml index 9d90a6bd..16cbca54 100644 --- a/hosts/ocaml/bin/run_tests.ml +++ b/hosts/ocaml/bin/run_tests.ml @@ -332,9 +332,10 @@ let make_test_env () = let result = eval_expr (List [Symbol "aser"; expr; Env e]) (Env e) in (match result with SxExpr s -> String s | String s -> String s | _ -> String (Sx_runtime.value_to_str result)) | _ -> String ""); - (* Scope primitives — use a local scope stacks table. - Must match the same pattern as sx_server.ml's _scope_stacks. *) - let _scope_stacks : (string, Sx_types.value list) Hashtbl.t = Hashtbl.create 8 in + (* Scope primitives — share the same scope stacks as sx_primitives.ml + so that CEK evaluator's scope_push/scope_peek and SX-level scope-push!/scope-peek + operate on the same table. *) + let _scope_stacks = Sx_primitives._scope_stacks in bind "scope-push!" (fun args -> match args with | [String name; value] -> @@ -1382,6 +1383,7 @@ let run_spec_tests env test_files = | Some (Lambda _ as fn) -> Sx_ref.cek_call fn (List args) | _ -> String ""))); + let files = if test_files = [] then begin (* Spec tests (core language — always run) *) let spec_entries = Sys.readdir spec_tests_dir in