test+docs: spec coverage for migratus-enablement fixes; list migratus
Adds spec/conformance coverage for everything landed enabling migratus:
- conformance corpus (runs interpret/compile/self-host): def 3-arg docstring,
def/defn ^{:map} name meta, defmacro arity-clause + docstring, defmulti
docstring, assoc-nil/assoc-in real maps, try multi-body + finally-on-success,
current-ns restore after a caught throw, cross-ns methods visibility.
- spec suites: host-interop (exception ctors, Character/Thread/Long, Timestamp/
SimpleDateFormat, java.io.File model + File-aware file-seq, clojure.tools.logging),
regex (Pattern statics + MULTILINE + quote, String .matches/.replaceAll/
.replaceFirst), maps (assoc on nil), multimethods (defmulti docstring +
value-based methods/get-method), macros (defmacro arity-clause + name meta).
Rewrote clojure.tools.logging/spy as a single variadic arity (jolt defmacro
takes only the first clause of a multi-arity macro — jolt-q8l).
docs/libraries.md: add migratus and the next.jdbc compatibility layer, with the
janet-lang/sqlite3 int64 caveat for 14-digit timestamp ids.
Full gate green; conformance 350/350 x3 modes.
This commit is contained in:
parent
4f59958d92
commit
72e36f46de
8 changed files with 145 additions and 6 deletions
|
|
@ -177,3 +177,13 @@
|
|||
["empty? lazy nil elem" "false" "(empty? (cons nil nil))"]
|
||||
["empty? sorted" "[true false]" "[(empty? (sorted-map)) (empty? (sorted-set 1))]"]
|
||||
["empty? number throws" :throws "(empty? 5)"])
|
||||
|
||||
# (assoc nil k v) yields a real immutable map, not a raw host table, so
|
||||
# assoc-in into absent keys nests countable/seqable maps (jolt-w4s).
|
||||
(defspec "map / assoc on nil"
|
||||
["assoc nil is a map" "{:a 1}" "(assoc nil :a 1)"]
|
||||
["count of assoc nil" "1" "(count (assoc nil :a 1))"]
|
||||
["assoc-in nested countable" "1" "(count (:a (assoc-in {} [:a :b] 1)))"]
|
||||
["assoc-in deep get" "9" "(get-in (assoc-in {} [:a :b :c] 9) [:a :b :c])"]
|
||||
["seq over assoc-nil map" ":a" "(ffirst (seq (assoc nil :a 1)))"]
|
||||
["keys of assoc-nil map" "[:a]" "(vec (keys (assoc nil :a 1)))"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue