[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 664927b: Add an expensive test for defcustom types
From: |
Lars Ingebrigtsen |
Subject: |
master 664927b: Add an expensive test for defcustom types |
Date: |
Fri, 25 Sep 2020 08:46:47 -0400 (EDT) |
branch: master
commit 664927b5257fdaf26f24063edb1f41c407805ed8
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add an expensive test for defcustom types
* admin/cus-test.el (cus-test-opts): Return the tests.
* test/lisp/custom-tests.el (check-for-wrong-custom-types): Test
custom types (bug#30990).
---
admin/cus-test.el | 11 ++++++++---
test/lisp/custom-tests.el | 5 +++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/admin/cus-test.el b/admin/cus-test.el
index 8422409..cee8c19 100644
--- a/admin/cus-test.el
+++ b/admin/cus-test.el
@@ -370,7 +370,9 @@ This function is suitable for batch mode. E.g., invoke
in the Emacs source directory.
Normally only tests options belonging to files in loaddefs.el.
-If optional argument ALL is non-nil, test all files with defcustoms."
+If optional argument ALL is non-nil, test all files with defcustoms.
+
+Returns a list of variables with suspicious types."
(interactive)
(and noninteractive
command-line-args-left
@@ -382,9 +384,12 @@ If optional argument ALL is non-nil, test all files with
defcustoms."
(message "Running %s" 'cus-test-apropos)
(cus-test-apropos "")
(if (not cus-test-errors)
- (message "No problems found")
+ (progn
+ (message "No problems found")
+ nil)
(message "The following options might have problems:")
- (cus-test-message cus-test-errors)))
+ (cus-test-message cus-test-errors)
+ cus-test-errors))
(defun cus-test-deps ()
"Run a verbose version of `custom-load-symbol' on all atoms.
diff --git a/test/lisp/custom-tests.el b/test/lisp/custom-tests.el
index cabbf86..d94527b 100644
--- a/test/lisp/custom-tests.el
+++ b/test/lisp/custom-tests.el
@@ -147,4 +147,9 @@
(widget-apply field :value-to-internal
origvalue)
"bar"))))))
+(ert-deftest check-for-wrong-custom-types ()
+ :tags '(:expensive-test)
+ (load (concat installation-directory "admin/cus-test.el"))
+ (should (null (cus-test-opts t))))
+
;;; custom-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 664927b: Add an expensive test for defcustom types,
Lars Ingebrigtsen <=