branch: externals/compat
commit 21533c286edb2dd726cc1505f0266989b1d7361e
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    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