File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,26 @@ buffer."
102
102
(with-clojure-buffer " SomeRecord."
103
103
(expect (cider-symbol-at-point) :to-equal " SomeRecord" ))))
104
104
105
+ (describe " when the symbol at point is quoted"
106
+ (it " returns the symbol without the preceding '"
107
+ (with-clojure-buffer " 'foo'bar"
108
+ (expect (cider-symbol-at-point) :to-equal " foo'bar" ))))
109
+
110
+ (describe " when point is on a keyword"
111
+ (it " returns the keyword along with beginning : character"
112
+ (with-clojure-buffer " :abc"
113
+ (expect (cider-symbol-at-point) :to-equal " :abc" ))
114
+ (with-clojure-buffer " :abc/foo"
115
+ (expect (cider-symbol-at-point) :to-equal " :abc/foo" )))
116
+
117
+ (it " attempts to resolve namespaced keywords"
118
+ (spy-on 'cider-sync-request:macroexpand :and-return-value " :foo.bar/abc" )
119
+ (with-clojure-buffer " (ns foo.bar) ::abc"
120
+ (expect (cider-symbol-at-point) :to-equal " :foo.bar/abc" ))
121
+ (spy-on 'cider-sync-request:macroexpand :and-return-value " :clojure.string/abc" )
122
+ (with-clojure-buffer " (ns foo.bar (:require [clojure.string :as str])) ::str/abc"
123
+ (expect (cider-symbol-at-point) :to-equal " :clojure.string/abc" ))))
124
+
105
125
(describe " when there's nothing at point"
106
126
(it " returns nil"
107
127
(spy-on 'thing-at-point :and-return-value nil )
You can’t perform that action at this time.
0 commit comments