Skip to content
  • Sponsor clojure-emacs/clojure-mode

  • Notifications You must be signed in to change notification settings
  • Fork 247

Commit 497727a

Browse files
SophieBosiobbatsov
authored andcommittedDec 11, 2024
Add tests
1 parent 7663004 commit 497727a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed
 

‎test/clojure-mode-util-test.el

+15-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,21 @@
374374
"(deftest ^{:a 1} simple-metadata)
375375
(deftest ^{:a {}} complex-metadata)
376376
(deftest |no-metadata)"
377-
(expect (clojure-find-def) :to-equal '("deftest" "no-metadata")))))
377+
(expect (clojure-find-def) :to-equal '("deftest" "no-metadata"))))
378+
(it "should recognize defn-"
379+
(with-clojure-buffer-point
380+
"(def foo 1)
381+
(defn- bar |[x y z] z)
382+
(def bar 2)"
383+
(expect (clojure-find-def) :to-equal '("defn-" "bar")))
384+
(with-clojure-buffer-point
385+
"(def foo 1)
386+
(defn- ^:private bar |[x y z] z)"
387+
(expect (clojure-find-def) :to-equal '("defn-" "bar")))
388+
(with-clojure-buffer-point
389+
"(defn- |^{:doc \"A function\"} foo [] 1)
390+
(defn- ^:private bar 2)"
391+
(expect (clojure-find-def) :to-equal '("defn-" "foo")))))
378392

379393
(provide 'clojure-mode-util-test)
380394

0 commit comments

Comments
 (0)