From dedd19a2f5cbf16c8ac8a122b0c39ee4e178b9e8 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 27 Jun 2022 12:36:37 +0200 Subject: Add new type predicate plistp * lisp/subr.el (plistp): New type predicate (bug#47427). This referred to in the error message from plist-put: "Debugger entered--Lisp error: (wrong-type-argument plistp (a b c))". --- test/lisp/subr-tests.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 45dd2d71603..ced2bc5c4e5 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1081,5 +1081,14 @@ final or penultimate step during initialization.")) (dolist (c (list ?a ?b ?α ?β)) (should-not (char-uppercase-p c)))) +(ert-deftest test-plistp () + (should (plistp nil)) + (should-not (plistp 1)) + (should (plistp '(1 2))) + (should-not (plistp '(1 . 2))) + (should (plistp '(1 2 3 4))) + (should-not (plistp '(1 2 3))) + (should-not (plistp '(1 2 3 . 4)))) + (provide 'subr-tests) ;;; subr-tests.el ends here -- cgit v1.2.1