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

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

[nongnu] elpa/clojure-mode 4528e876e5 5/7: Add more `def...-` tests, wi


From: ELPA Syncer
Subject: [nongnu] elpa/clojure-mode 4528e876e5 5/7: Add more `def...-` tests, with and without metadata
Date: Wed, 11 Dec 2024 12:59:25 -0500 (EST)

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

    Add more `def...-` tests, with and without metadata
---
 test/clojure-mode-util-test.el | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/test/clojure-mode-util-test.el b/test/clojure-mode-util-test.el
index c7b47e3c7c..be708c397f 100644
--- a/test/clojure-mode-util-test.el
+++ b/test/clojure-mode-util-test.el
@@ -390,10 +390,39 @@
          (defn- ^:private bar 2)"
         (expect (clojure-find-def) :to-equal '("defn-" "foo"))))
   (it "should recognize def...-, with or without metadata"
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (def- bar| 5)
+         (def baz 2)"
+        (expect (clojure-find-def) :to-equal '("def-" "bar")))
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (deftest- bar |[x y z] z)
+         (def baz 2)"
+        (expect (clojure-find-def) :to-equal '("deftest-" "bar")))
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (defxyz- bar| 5)
+         (def baz 2)"
+        (expect (clojure-find-def) :to-equal '("defxyz-" "bar")))
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (defn-n- bar| [x y z] z)
+         (def baz 2)"
+        (expect (clojure-find-def) :to-equal '("defn-n-" "bar")))
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (defn-n- ^:private bar |[x y z] z)"
+        (expect (clojure-find-def) :to-equal '("defn-n-" "bar")))
     (with-clojure-buffer-point
         "(def-n- |^{:doc \"A function\"} foo [] 1)
-         (defn- ^:private bar 2)"
-        (expect (clojure-find-def) :to-equal '("def-n-" "foo")))))
+         (def- ^:private bar 2)"
+        (expect (clojure-find-def) :to-equal '("def-n-" "foo")))
+    (with-clojure-buffer-point
+        "(def foo 1)
+         (defn-n- ^{:|a {}} complex-metadata |[x y z] z)
+         (def bar 2)"
+        (expect (clojure-find-def) :to-equal '("defn-n-" 
"complex-metadata")))))
 
 (provide 'clojure-mode-util-test)
 



reply via email to

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