branch: externals/compat
commit cae28783bb03070f0d97cc3b30832641c4de316b
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Add basic compat-funcall test
---
compat-tests.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/compat-tests.el b/compat-tests.el
index 23c01c1d25..5a83a8c1d7 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -165,6 +165,14 @@ being compared against."
+(ert-deftest compat-funcall ()
+ (let (list)
+ (setq list (compat-funcall plist-put list "first" 1 #'string=))
+ (setq list (compat-funcall plist-put list "second" 2 #'string=))
+ (setq list (compat-funcall plist-put list "first" 10 #'string=))
+ (should (eq (compat-funcall plist-get list "first" #'string=) 10))
+ (should (eq (compat-funcall plist-get list "second" #'string=) 2))))
+
(compat-deftests string-search
;; Find needle at the beginning of a haystack:
(ought 0 "a" "abb")