branch: externals/leaf
commit c5ddde8bbb2d6965fd4e03fa4d6ea48fa8122f30
Author: Zheng Junjie <[email protected]>
Commit: Zheng Junjie <[email protected]>
leaf-path: add test
---
leaf-tests.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/leaf-tests.el b/leaf-tests.el
index ff47f0e..3c706ee 100644
--- a/leaf-tests.el
+++ b/leaf-tests.el
@@ -2780,6 +2780,16 @@ Example:
(mapcar 'car (cdr (assoc "Leaf" (funcall
imenu-create-index-function)))))
'("scala-mode" "lsp-metals" "*scala-flycheck-integration"))))
+(let ((leaf--paths nil))
+ ;; must eval in `require' or `load'.
+ (leaf leaf-1)
+ (leaf leaf-2 :leaf-path nil)
+ (eval `(cort-deftest-with-equal leaf/leaf-path
+ '((leaf--paths
+ ',(list (cons 'leaf-1 load-file-name)))
+ ((assoc 'leaf-2 leaf--paths)
+ nil)))))
+
(when (version<= "24.3" emacs-version)
(require 'cl-lib)
(cort-deftest-with-equal leaf/leaf-plist-get