test/core: cover ns form + :use; fix use-impl spec parsing
Checking test coverage for the namespace tiers surfaced a real bug nothing exercised: use-impl checked (array? s) to find a spec's ns symbol, but a vector spec like [src.x] is a pvec/tuple, not a Janet array — so (:use ...) and standalone (use ...) errored. Fixed to coerce (pvec->array) then take the head when the spec is indexed (matching require-impl). Added coverage that was missing: - conformance (x3 modes): the (ns …) form itself + :use refers. - namespaces-spec: (ns …) form, :use, standalone use. The :use/(use …) path had ZERO tests before, which is why the bug slipped through earlier tiers. EBNF needs no change — it's a reader/syntax grammar with no special-forms enumeration; ns/require/protocol syntax is unchanged (the destructuring note was already updated in jolt-f79). Gate green: conformance 269x3, fallback-zero 38/4, self-host, sci-bootstrap, bootstrap-fixpoint, staged-bootstrap, clojure-test-suite >=4034/67, namespace, all unit + spec (namespaces 27/27).
This commit is contained in:
parent
8e98a16e25
commit
0626b66987
3 changed files with 11 additions and 2 deletions
|
|
@ -135,6 +135,8 @@
|
|||
|
||||
### ---- HIGH: aliased namespace calls ----
|
||||
["require :as alias" "\"1,2,3\"" "(do (require (quote [clojure.string :as s])) (s/join \",\" [1 2 3]))"]
|
||||
["ns form + alias" "\"HI\"" "(do (ns my.a (:require [clojure.string :as s])) (s/upper-case \"hi\"))"]
|
||||
["ns :use refers" "42" "(do (ns src.u) (def helper 42) (ns dst.u (:use [src.u])) helper)"]
|
||||
|
||||
### ---- MED: missing core fns ----
|
||||
["peek vec" "3" "(peek [1 2 3])"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue