summaryrefslogtreecommitdiff
path: root/test/lisp/subr-tests.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-09-16 15:29:03 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-09-16 15:33:12 +0200
commit4da0fbdc82577da0583c8858a52f456beb23fd0e (patch)
tree42933fcb0f05db0327d6b8f546f21f07a2aaf6ec /test/lisp/subr-tests.el
parent838e6cae81392139377dd8b78b52ff3aaeba2fc1 (diff)
downloademacs-4da0fbdc82577da0583c8858a52f456beb23fd0e.tar.gz
Faster and more robust list-of-strings-p
* lisp/subr.el (list-of-strings-p): Speed up by a factor 4 (approx.) and don't crash on dotted lists. * test/lisp/subr-tests.el (test-list-of-strings-p): Extend test.
Diffstat (limited to 'test/lisp/subr-tests.el')
-rw-r--r--test/lisp/subr-tests.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 38966cea585..347981e8185 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -1163,7 +1163,8 @@ final or penultimate step during initialization."))
(should (list-of-strings-p nil))
(should (list-of-strings-p '("a" "b")))
(should-not (list-of-strings-p ["a" "b"]))
- (should-not (list-of-strings-p '("a" nil "b"))))
+ (should-not (list-of-strings-p '("a" nil "b")))
+ (should-not (list-of-strings-p '("a" "b" . "c"))))
(provide 'subr-tests)
;;; subr-tests.el ends here