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

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

[elpa] externals/compat 21533c286e 2/6: Add function-put test


From: ELPA Syncer
Subject: [elpa] externals/compat 21533c286e 2/6: Add function-put test
Date: Wed, 4 Jan 2023 18:57:26 -0500 (EST)

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

    Add function-put test
---
 compat-25.el    | 2 +-
 compat-tests.el | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/compat-25.el b/compat-25.el
index 1a01b57fb8..8ac018632b 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -251,7 +251,7 @@ threading."
 
 ;;;; Defined in byte-run.el
 
-(compat-defun function-put (func prop value) ;; <UNTESTED>
+(compat-defun function-put (func prop value) ;; <OK>
   "Set FUNCTION's property PROP to VALUE.
 The namespace for PROP is shared with symbols.
 So far, FUNCTION can only be a symbol, not a lambda expression."
diff --git a/compat-tests.el b/compat-tests.el
index 91ec545f63..8892ec508a 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -46,6 +46,11 @@
 (defmacro should-equal (a b)
   `(should (equal ,a ,b)))
 
+(defun compat-function-put-test ())
+(ert-deftest function-put ()
+  (function-put #'compat-function-put-test 'compat-test 42)
+  (should-equal 42 (function-get #'compat-function-put-test 'compat-test)))
+
 (ert-deftest ignore-error ()
   (should-equal (ignore-error (end-of-file)
                   (read ""))



reply via email to

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