File tree Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 247247
248248 (clojure-unwind '(4 )))
249249
250+ (when-refactoring-it " should unwind correctly when multiple ->> are present on same line"
251+ " (->> 1 inc) (->> [1 2 3 4 5]
252+ (filter even?)
253+ (map square))"
254+
255+ " (->> 1 inc) (->> (map square (filter even? [1 2 3 4 5])))"
256+
257+ (clojure-unwind)
258+ (clojure-unwind))
259+
250260 (when-refactoring-it " should unwind with function name"
251261 " (->> [1 2 3 4 5]
252262 sum
299309
300310 (when-refactoring-it " should unwind some->>"
301311 " (some->> :b
302- (find {:a 1})
303- val
312+ (find {:a 1}) val
304313 (+ 5))"
305314
306315 " (some->> (+ 5 (val (find {:a 1} :b))))"
Original file line number Diff line number Diff line change 3131 (wrong))"
3232 ; ; make this use the native beginning of defun since this is used to
3333 ; ; determine whether to use the comment aware version or not.
34+ (expect (let ((beginning-of-defun-function nil ))
35+ (clojure-top-level-form-p " comment" )))))
36+ (it " should return true when multiple forms are present"
37+ (with-clojure-buffer-point
38+ " (+ 1 2) (comment
39+ (wrong)
40+ (rig|ht)
41+ (wrong))"
3442 (expect (let ((beginning-of-defun-function nil ))
3543 (clojure-top-level-form-p " comment" ))))))
3644
3745(describe " clojure-beginning-of-defun-function"
3846 (it " should go to top level form"
3947 (with-clojure-buffer-point
40- " (comment
48+ " (comment
4149 (wrong)
4250 (wrong)
4351 (rig|ht)
4452 (wrong))"
45- (beginning-of-defun )
53+ (clojure- beginning-of-defun-function )
4654 (expect (looking-at-p " (comment" ))))
4755
4856 (it " should eval top level forms inside comment forms when clojure-toplevel-inside-comment-form set to true"
4957 (with-clojure-buffer-point
50- " (comment
51- (wrong)
58+ " (+ inc 1) (comment
5259 (wrong)
53- (rig|ht)
60+ (wrong) ( rig|ht)
5461 (wrong))"
5562 (let ((clojure-toplevel-inside-comment-form t ))
56- (beginning-of-defun ))
57- (expect (looking-at-p " [[:space:]]* (right)" ))))
63+ (clojure- beginning-of-defun-function ))
64+ (expect (looking-at-p " (right)" ))))
5865
5966 (it " should go to beginning of previous top level form"
6067 (with-clojure-buffer-point
You can’t perform that action at this time.
0 commit comments