We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3a7d21 commit 84317c8Copy full SHA for 84317c8
test/rewrite_clj/zip_test.clj
@@ -81,6 +81,11 @@
81
(-> root z/down z/right z/right (z/edit + 5) z/root)
82
=> [:vector [:token 1] [:whitespace "\n "] [:token 2] [:whitespace "\n "] [:token 8]]))
83
84
+(fact "about zipper splice"
85
+ (let [root (z/edn (p/parse-string "[1 [2 3] 4]"))]
86
+ (z/sexpr root) => [1 [2 3] 4]
87
+ (-> root z/down z/right z/splice z/up z/sexpr) => [1 2 3 4]))
88
+
89
(fact "about zipper search/find traversal"
90
(-> root z/down (z/find-value :description) z/right z/node) => [:token "A project."]
91
(-> root (z/find-value z/next :description) z/right z/node) => [:token "A project."]
0 commit comments