summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar.batsov@gmail.com>2015-08-05 14:18:13 +0300
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2015-08-05 14:18:13 +0300
commit070f547bb5ff8745a51da82c9bde6d772889a5f9 (patch)
tree5b3050ad7bd4b9cb06d4b5d966e98bde09831010 /test
parent7432d241e0b1428cdd2c9819fb5877ca717d5cd5 (diff)
parent0bc06d67c0c0c095288e573d64b394d547174606 (diff)
Merge pull request #1235 from Malabarba/master
Add support for `(...) to the debugger
Diffstat (limited to 'test')
-rw-r--r--test/cider-tests.el37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/cider-tests.el b/test/cider-tests.el
index ec57b18f..f1a1bbd6 100644
--- a/test/cider-tests.el
+++ b/test/cider-tests.el
@@ -65,6 +65,43 @@
(message "%S" (point))
(should (string= (thing-at-point 'symbol) "2"))))
+(ert-deftest test-debug-move-point-syntax-quote ()
+ (with-temp-buffer
+ (clojure-mode)
+ (save-excursion (insert "(let [b 1] `((~b)))"))
+ (cider--debug-move-point '(2 1 1 1 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "(let [b 1] `((~b"))
+ (goto-char (point-min))
+ (cider--debug-move-point '(2 1 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "(let [b 1] `((~b)")))
+
+ (with-temp-buffer
+ (clojure-mode)
+ (save-excursion (insert "`((~a))"))
+ (cider--debug-move-point '(1 1 1 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "`((~a"))
+ (goto-char (point-min))
+ (cider--debug-move-point '(1 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "`((~a)")))
+
+ (with-temp-buffer
+ (clojure-mode)
+ (save-excursion (insert "`#{(~c)}"))
+ (cider--debug-move-point '(2 1 1 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "`#{(~c"))
+ (goto-char (point-min))
+ (cider--debug-move-point '(2 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "`#{(~c)")))
+
+ (with-temp-buffer
+ (clojure-mode)
+ (save-excursion (insert "`[(~d)]"))
+ (cider--debug-move-point '(2 1 1 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "`[(~d"))
+ (goto-char (point-min))
+ (cider--debug-move-point '(2 1 1 1))
+ (should (string= (buffer-substring (point-min) (point)) "`[(~d)"))))
+
(ert-deftest test-cider-connection-buffer-name ()
(setq-local nrepl-endpoint '("localhost" 1))
(let ((nrepl-hide-special-buffers nil))