emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/clojure-mode 497727a130 2/7: Add tests


From: ELPA Syncer
Subject: [nongnu] elpa/clojure-mode 497727a130 2/7: Add tests
Date: Wed, 11 Dec 2024 12:59:25 -0500 (EST)

branch: elpa/clojure-mode
commit 497727a1305dc29efcc273f6985ace2f5b08b27f
Author: Sophie Bosio <sophie.bosio@outlook.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>

    Add tests
---
 test/clojure-mode-util-test.el | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/test/clojure-mode-util-test.el b/test/clojure-mode-util-test.el
index f1895b6746..c372cffc01 100644
--- a/test/clojure-mode-util-test.el
+++ b/test/clojure-mode-util-test.el
@@ -374,7 +374,21 @@
         "(deftest ^{:a 1} simple-metadata)
          (deftest ^{:a {}} complex-metadata)
          (deftest |no-metadata)"
-        (expect (clojure-find-def) :to-equal '("deftest" "no-metadata")))))
+        (expect (clojure-find-def) :to-equal '("deftest" "no-metadata"))))
+  (it "should recognize defn-"
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (defn- bar |[x y z] z)
+         (def bar 2)"
+        (expect (clojure-find-def) :to-equal '("defn-" "bar")))
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (defn- ^:private bar |[x y z] z)"
+        (expect (clojure-find-def) :to-equal '("defn-" "bar")))
+    (with-clojure-buffer-point
+        "(defn- |^{:doc \"A function\"} foo [] 1)
+         (defn- ^:private bar 2)"
+        (expect (clojure-find-def) :to-equal '("defn-" "foo")))))
 
 (provide 'clojure-mode-util-test)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]