File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 169
169
(goto-char (point-max ))
170
170
(expect (clojure-find-ns) :to-equal expected)))))))
171
171
172
+ (describe " clojure-sexp-starts-until-position"
173
+ (it " should return starting points for forms"
174
+ (with-clojure-buffer " (run 1) (def b 2) (slurp \" file\" )\n "
175
+ (goto-char (point-min ))
176
+ (expect (not (cl-set-difference '(19 9 1 )
177
+ (clojure-sexp-starts-until-position (point-max )))))))
178
+
179
+ (it " should return starting point for a single form in file"
180
+ (with-clojure-buffer " comment\n "
181
+ (goto-char (point-min ))
182
+ (expect (not (cl-set-difference '(1 )
183
+ (clojure-sexp-starts-until-position (point-max )))))))
184
+
185
+ (it " should return nil if POSITION is behind"
186
+ (with-clojure-buffer " (run 1) (def b 2)\n "
187
+ (goto-char (point-max ))
188
+ (expect (not (clojure-sexp-starts-until-position (- (point-max ) 1 )))))))
189
+
172
190
(provide 'clojure-mode-sexp-test )
173
191
174
192
; ;; clojure-mode-sexp-test.el ends here
You can’t perform that action at this time.
0 commit comments