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

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

[nongnu] elpa/hyperdrive 82305e861b 15/82: WIP: Have macro define narrow


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 82305e861b 15/82: WIP: Have macro define narrower tests
Date: Mon, 25 Sep 2023 19:00:50 -0400 (EDT)

branch: elpa/hyperdrive
commit 82305e861b7d130124d14f3d35025efe7d56ba1d
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    WIP: Have macro define narrower tests
---
 tests/test-hyperdrive-org-link.el | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/tests/test-hyperdrive-org-link.el 
b/tests/test-hyperdrive-org-link.el
index c12fe2218c..2353e69a12 100644
--- a/tests/test-hyperdrive-org-link.el
+++ b/tests/test-hyperdrive-org-link.el
@@ -99,17 +99,20 @@
           ;;                                 [":insert-into" sexp]
           ;;                                 [":results" sexp]]))
           )
-  (let ((test-name (intern (concat "hyperdrive-test-org-link/" (symbol-name 
name))))
-        body-forms)
+  (let (body-forms)
     (pcase-dolist ((map (:let vars) (:result result)) results)
-      (push `(let (,@vars)
-               (should (equal ,result
-                              (hyperdrive-test-org-link-roundtrip ,store-body
-                                :store-from ,store-from :insert-into 
,insert-into))))
-            body-forms))
-    `(ert-deftest ,test-name ()
-       "Docstring."
-       ,@(nreverse body-forms))))
+      (let* ((olfpt (cadadr (assoc 'org-link-file-path-type vars)))
+             (holfu (cadr (assoc 'hyperdrive-org-link-full-url vars)))
+             (test-name (intern (format "hyperdrive-test-org-link/%s/%s-%s"
+                                        name olfpt holfu))))
+        (push `(ert-deftest ,test-name ()
+                 "Docstring."
+                 (let (,@vars)
+                   (should (equal ,result
+                                  (hyperdrive-test-org-link-roundtrip 
,store-body
+                                    :store-from ,store-from :insert-into 
,insert-into)))))
+              body-forms)))
+    `(progn ,@(nreverse body-forms))))
 
 (hyperdrive-test-org-link-deftest same-drive-same-file-before-heading
   :store-body "<|>



reply via email to

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