File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 169169 (goto-char (point-max ))
170170 (expect (clojure-find-ns) :to-equal expected)))))))
171171
172+ (describe " clojure-sexp-starts-until-position"
173+ (it " should return starting points for forms after POINT until POSITION"
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 buffer after POINT"
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 POINT"
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+
172190(provide 'clojure-mode-sexp-test )
173191
174192; ;; clojure-mode-sexp-test.el ends here
You can’t perform that action at this time.
0 commit comments