diff options
author | dan sutton <danielsutton01@gmail.com> | 2018-08-14 08:15:47 -0500 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2018-08-18 04:53:04 +0200 |
commit | 9d2af835f2036c2f2f0cad82bfccea927b988ef0 (patch) | |
tree | d54c344a5bb03bc703ffc9bc0d3975d7a128e4b5 /test | |
parent | 0a1f536bdf351ec756b7bd8c1bc0e8750a36b8aa (diff) |
Remove comment aware toplevel defun code
This code has migrated to clojure-mode and is now installed such that
`end-of-defun` and `beginning-of-defun` are aware of comment forms. As
such CIDER no longer needs to special case them and can just navigate
as usual.
Diffstat (limited to 'test')
-rw-r--r-- | test/cider-util-tests.el | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/test/cider-util-tests.el b/test/cider-util-tests.el index 7b07c941..a9878af5 100644 --- a/test/cider-util-tests.el +++ b/test/cider-util-tests.el @@ -125,73 +125,6 @@ (insert "'") (expect (cider-sexp-at-point 'bounds) :to-equal '(5 15)))))) -(defmacro cider-buffer-with-text - (text &rest body) - "Run body in a temporary clojure buffer with TEXT. -TEXT is a string with a | indicating where point is. The | will be erased -and point left there." - (declare (indent 2)) - `(progn - (with-temp-buffer - (erase-buffer) - (clojure-mode) - (insert ,text) - (goto-char (point-min)) - (re-search-forward "|") - (delete-char -1) - ,@body))) - -(describe "cider-defun-inside-comment-form" - (describe "when param 'bounds is not given" - (it "returns the form containing point" - (cider-buffer-with-text - "(comment - (wrong) - (wrong) - (rig|ht) - (wrong))" - (expect (cider-defun-inside-comment-form) :to-equal "(right)"))) - (it "attaches to the previous top level comment" - (cider-buffer-with-text - "(comment - (wrong) - (wrong) - (right) | - (wrong))" - (expect (cider-defun-inside-comment-form) :to-equal "(right)"))) - (it "attaches to the next top level comment even if its on the same line" - (cider-buffer-with-text - "(comment - (wrong) - (wrong) - (right) - | (wrong))" - (expect (cider-defun-inside-comment-form) :to-equal "(right)"))) - (it "returns the top level even if heavily nested" - (cider-buffer-with-text - "(comment - (wrong) - (wrong) - (((((r|ight))))) - (wrong))" - (expect (cider-defun-inside-comment-form) :to-equal "(((((right)))))"))) - (it "works even on the last form in a comment" - (cider-buffer-with-text - "(comment - (wrong) - (wrong) - (right|))" - (expect (cider-defun-inside-comment-form) :to-equal "(right)"))) - (it "works on the last form even after the comment form" - (cider-buffer-with-text - "(comment (wrong) (wrong) (right)) |" - (expect (cider-defun-inside-comment-form) :to-equal "(right)")))) - (describe "returns entire comment form when" - (it "the comment form is empty" - (cider-buffer-with-text - "(comment|)" - (expect (cider-defun-inside-comment-form) :to-equal "(comment)"))))) - (describe "cider-defun-at-point" (describe "when the param 'bounds is not given" (it "returns the defun at point" |