Skip to content

Commit 9c03573

Browse files
committed
z/replace doesn't change the current position
1 parent ac46ba4 commit 9c03573

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/rewrite_clj/zip/zip_test.clj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,9 @@
7070
(let [root (base/of-string "[hello world]")]
7171
(-> root z/down z/remove z/position) => [1 1]
7272
(-> root z/down z/right z/remove z/position) => [1 2]))
73+
74+
(fact "z/replace doesn't change the current position"
75+
(-> (base/of-string "[hello world]")
76+
z/down
77+
(z/replace 'x)
78+
z/position) => [1 2])

0 commit comments

Comments
 (0)