aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/lisp/subr-tests.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index df330bf60fc..3459a653283 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -1285,6 +1285,22 @@ final or penultimate step during initialization."))
1285 (nconc cycle cycle) 1285 (nconc cycle cycle)
1286 (should-not (plistp cycle)))) 1286 (should-not (plistp cycle))))
1287 1287
1288(defun subr-tests--some-fun ())
1289(defalias 'subr-tests--some-alias #'subr-tests--some-fun)
1290
1291(ert-deftest subr-tests-function-get ()
1292 (unwind-protect
1293 (progn
1294 (should (eq (function-get 'subr-tests--some-fun 'prop) nil))
1295 (should (eq (function-get 'subr-tests--some-alias 'prop) nil))
1296 ;; With the function symbol directly.
1297 (function-put 'subr-tests--some-fun 'prop 'value)
1298 (should (eq (function-get 'subr-tests--some-fun 'prop) 'value))
1299 ;; With an alias.
1300 (should (eq (function-get 'subr-tests--some-alias 'prop) 'value))
1301 (function-put 'subr-tests--some-alias 'prop 'value))
1302 (function-put 'subr-tests--some-fun 'prop nil)))
1303
1288(defun subr-tests--butlast-ref (list &optional n) 1304(defun subr-tests--butlast-ref (list &optional n)
1289 "Reference implementation of `butlast'." 1305 "Reference implementation of `butlast'."
1290 (let ((m (or n 1)) 1306 (let ((m (or n 1))