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

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

[elpa] externals/compat cae28783bb 02/11: Add basic compat-funcall test


From: ELPA Syncer
Subject: [elpa] externals/compat cae28783bb 02/11: Add basic compat-funcall test
Date: Tue, 3 Jan 2023 15:57:28 -0500 (EST)

branch: externals/compat
commit cae28783bb03070f0d97cc3b30832641c4de316b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    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")



reply via email to

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