[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole f8fd43c 3/3: Merge branch 'master' of hyperbo
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole f8fd43c 3/3: Merge branch 'master' of hyperbole |
Date: |
Sat, 24 Apr 2021 13:57:11 -0400 (EDT) |
branch: externals/hyperbole
commit f8fd43c4315d79873d1c94a59691d09425b7391e
Merge: 946225e 189d4b1
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
Merge branch 'master' of hyperbole
---
Changes | 10 ++++++++++
test/hbut-tests.el | 25 +++++++++++++++++++++++++
test/hpath-tests.el | 18 ++++++++++++++++++
3 files changed, 53 insertions(+)
diff --git a/Changes b/Changes
index d30a1a3..1e1a5d4 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,13 @@
+2021-04-22 Mats Lidell <matsl@gnu.org>
+
+* test/hpath-tests.el (hpath:load-modifier-loads-file)
+ (hpath:load-modifier-with-plain-file-loads-file-from-load-path): Load
+ modifier tests.
+
+* test/hbut-tests.el (hbut-load-modifier-loads-file)
+ (hbut-load-modifier-with-plain-file-loads-file-from-load-path): Load
+ modifier tests.
+
2021-04-21 Bob Weiner <rsw@gnu.org>
* hib-social.el (hibtypes-social-hashtag-alist): Fix to use && for executing
diff --git a/test/hbut-tests.el b/test/hbut-tests.el
index 67eb735..49de855 100644
--- a/test/hbut-tests.el
+++ b/test/hbut-tests.el
@@ -483,6 +483,31 @@
(action-key)
(should was-called)))))
+(ert-deftest hbut-load-modifier-loads-file ()
+ "Path prefix - will load elisp file."
+ (with-temp-buffer
+ (insert "\"-/folder/hyperbole.el\"")
+ (goto-char 2)
+ (let ((was-called nil))
+ (cl-letf (((symbol-function 'load)
+ (lambda (filename)
+ (setq was-called (should (string= "/folder/hyperbole.el"
filename))))))
+ (action-key)
+ (should was-called)))))
+
+(ert-deftest hbut-load-modifier-with-plain-file-loads-file-from-load-path ()
+ "Path prefix - with filename without diretory will load from`load-path'."
+ (with-temp-buffer
+ (insert "\"-tutorial.el\"")
+ (goto-char 2)
+ (let ((was-called nil))
+ (cl-letf (((symbol-function 'load)
+ (lambda (filename)
+ (setq was-called
+ (should (string= (locate-library "tutorial.el")
filename))))))
+ (action-key)
+ (should was-called)))))
+
;; This file can't be byte-compiled without the `el-mock' package (because of
;; the use of the `with-mock' macro), which is not a dependency of Hyperbole.
;; Local Variables:
diff --git a/test/hpath-tests.el b/test/hpath-tests.el
index b372640..1d4224d 100644
--- a/test/hpath-tests.el
+++ b/test/hpath-tests.el
@@ -56,6 +56,24 @@
(hpath:find "&/bin/ls")
(should was-called))))
+(ert-deftest hpath:load-modifier-loads-file ()
+ "Path prefix - will load elisp file."
+ (let ((was-called nil))
+ (cl-letf (((symbol-function 'load)
+ (lambda (filename)
+ (setq was-called (should (string= "/folder/hyperbole.el"
filename))))))
+ (hpath:find "-/folder/hyperbole.el")
+ (should was-called))))
+
+(ert-deftest hpath:load-modifier-with-plain-file-loads-file-from-load-path ()
+ "Path prefix - with filename without diretory will load from`load-path'."
+ (let ((was-called nil))
+ (cl-letf (((symbol-function 'load)
+ (lambda (filename)
+ (setq was-called
+ (should (string= (locate-library "tutorial.el")
filename))))))
+ (hpath:find "-tutorial.el")
+ (should was-called))))
(provide 'hpath-tests)
;;; hpath-tests.el ends here