Mercurial > emacs
annotate admin/cus-test.el @ 99397:ff14648b7933
Fix typo.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 05 Nov 2008 19:53:09 +0000 |
parents | e6db9ee945b8 |
children | ce88a631c161 |
rev | line source |
---|---|
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
1 ;;; cus-test.el --- tests for custom types and load problems |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
2 |
79744 | 3 ;; Copyright (C) 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
75348 | 4 ;; Free Software Foundation, Inc. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
5 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
6 ;; Author: Markus Rost <markus.rost@mathematik.uni-regensburg.de> |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
7 ;; Maintainer: Markus Rost <rost@math.ohio-state.edu> |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
8 ;; Created: 13 Sep 1998 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
9 ;; Keywords: maint |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
10 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
11 ;; This file is part of GNU Emacs. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
12 |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
13 ;; GNU Emacs is free software: you can redistribute it and/or modify |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
14 ;; it under the terms of the GNU General Public License as published by |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
15 ;; the Free Software Foundation, either version 3 of the License, or |
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
16 ;; (at your option) any later version. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
17 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
18 ;; GNU Emacs is distributed in the hope that it will be useful, |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
21 ;; GNU General Public License for more details. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
22 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
23 ;; You should have received a copy of the GNU General Public License |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79744
diff
changeset
|
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
25 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
26 ;;; Commentary: |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
27 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
28 ;; This file provides simple tests to detect custom options with |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
29 ;; incorrect customization types and load problems for custom and |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
30 ;; autoload dependencies. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
31 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
32 ;; The basic tests can be run in batch mode. Invoke them with |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
33 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
34 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
35 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
36 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-deps |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
37 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
38 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
39 ;; |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
40 ;; src/emacs -batch -l admin/cus-test.el -f cus-test-noloads |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
41 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
42 ;; in the emacs source directory. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
43 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
44 ;; For interactive use: Load this file. Then |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
45 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
46 ;; M-x cus-test-apropos REGEXP RET |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
47 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
48 ;; checks the options matching REGEXP. In particular |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
49 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
50 ;; M-x cus-test-apropos RET |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
51 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
52 ;; checks all options. The detected options are stored in the |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
53 ;; variable `cus-test-errors'. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
54 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
55 ;; Only those options are checked which have been already loaded. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
56 ;; Therefore `cus-test-apropos' is more efficient after loading many |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
57 ;; libraries. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
58 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
59 ;; M-x cus-test-load-custom-loads |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
60 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
61 ;; loads all (!) custom dependencies and |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
62 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
63 ;; M-x cus-test-load-libs |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
64 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
65 ;; loads all (!) libraries with autoloads. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
66 ;; |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
67 ;; Options with a custom-get property, usually defined by a :get |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
68 ;; declaration, are stored in the variable |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
69 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
70 ;; `cus-test-vars-with-custom-get' |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
71 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
72 ;; Options with a state of 'changed ("changed outside the customize |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
73 ;; buffer") are stored in the variable |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
74 ;; |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
75 ;; `cus-test-vars-with-changed-state' |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
76 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
77 ;; These lists are prepared just in case one wants to investigate |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
78 ;; those options further. |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
79 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
80 ;; The command `cus-test-opts' tests many (all?) custom options. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
81 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
82 ;; The command `cus-test-deps' is like `cus-test-load-custom-loads' |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
83 ;; but reports about load errors. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
84 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
85 ;; The command `cus-test-libs' runs for all libraries with autoloads |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
86 ;; separate emacs processes of the form "emacs -batch -l LIB". |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
87 ;; |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
88 ;; The command `cus-test-noloads' returns a list of variables which |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
89 ;; are somewhere declared as custom options, but not loaded by |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
90 ;; `custom-load-symbol'. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
91 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
92 ;; Some results from October 2002: |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
93 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
94 ;; 4523 options tested |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
95 ;; The following variables might have problems: |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
96 ;; ps-mule-font-info-database-default |
47884
b475e8cf9b0a
Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47858
diff
changeset
|
97 ;; grep-tree-command |
b475e8cf9b0a
Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47858
diff
changeset
|
98 ;; grep-find-command |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
99 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
100 ;; 288 features required |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
101 ;; 10 files loaded |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
102 ;; The following load problems appeared: |
47884
b475e8cf9b0a
Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47858
diff
changeset
|
103 ;; (killing x-win (file-error Cannot open load file x-win)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
104 ;; Symbol faces has loaddefs as custom dependency |
47858
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
105 ;; (reftex-index-support reftex-vars (void-function reftex-set-dirty)) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
106 ;; (eshell-script em-script (void-variable eshell-directory-name)) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
107 ;; (pcomplete em-cmpl (void-function eshell-under-windows-p)) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
108 ;; (eshell-ext esh-ext (void-function eshell-under-windows-p)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
109 ;; ... |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
110 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
111 ;; 422 libraries had no load errors |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
112 ;; The following load problems appeared: |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
113 ;; (eudc-export error 255) |
47858
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
114 ;; (ada-xref error 255) |
6ca67dbf4236
(cus-test-deps): Don't care about deps in lisp/term/.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47855
diff
changeset
|
115 ;; (ada-stmt error 255) |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
116 ;; |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
117 ;; The following options were not loaded by custom-load-symbol: |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
118 ;; edt-bottom-scroll-margin |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
119 ;; edt-keep-current-page-delimiter |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
120 ;; edt-top-scroll-margin |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
121 ;; edt-use-EDT-control-key-bindings |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
122 ;; edt-word-entities |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
123 ;; grep-find-use-xargs |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
124 ;; master-mode-hook |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
125 ;; outline-level |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
126 ;; outline-minor-mode-hook |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
127 ;; refill-mode-hook |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
128 |
47889
9553f9fe9ad3
(cus-test-libs): Use equal instead of =.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47886
diff
changeset
|
129 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
130 ;;; Code: |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
131 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
132 ;;; Workarounds. For a smooth run and to avoid some side effects. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
133 |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
134 (defvar cus-test-after-load-libs-hook nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
135 "Used to switch off undesired side effects of loading libraries.") |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
136 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
137 (defvar cus-test-skip-list nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
138 "List of variables to disregard by `cus-test-apropos'.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
139 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
140 (defvar cus-test-libs-noloads nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
141 "List of libraries not to load by `cus-test-load-libs'.") |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
142 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
143 ;; The file eudc-export.el loads libraries "bbdb" and "bbdb-com" which |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
144 ;; are not part of GNU Emacs: (locate-library "bbdb") => nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
145 ;; We avoid the resulting errors from loading eudc-export.el: |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
146 (provide 'bbdb) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
147 (provide 'bbdb-com) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
148 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
149 ;; This avoids a hang of `cus-test-apropos' in 21.2. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
150 ;; (add-to-list 'cus-test-skip-list 'sh-alias-alist) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
151 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
152 ;; Loading dunnet in batch mode leads to a Dead end. |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
153 (let (noninteractive) (load "dunnet")) |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
154 (add-to-list 'cus-test-libs-noloads "dunnet") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
155 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
156 ;; Never Viperize. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
157 (setq viper-mode nil) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
158 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
159 ;; Don't create a file `save-place-file'. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
160 (eval-after-load "saveplace" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
161 '(remove-hook 'kill-emacs-hook 'save-place-kill-emacs-hook)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
162 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
163 ;; Don't create a file `abbrev-file-name'. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
164 (setq save-abbrevs nil) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
165 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
166 ;; Avoid compile logs from adviced functions. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
167 (eval-after-load "bytecomp" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
168 '(setq ad-default-compilation-action 'never)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
169 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
170 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
171 ;;; Main code: |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
172 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
173 ;; We want to log all messages. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
174 (setq message-log-max t) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
175 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
176 (require 'cus-edit) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
177 (require 'cus-load) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
178 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
179 (defvar cus-test-errors nil |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
180 "List of problematic variables found by `cus-test-apropos'.") |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
181 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
182 (defvar cus-test-tested-variables nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
183 "List of options tested by last call of `cus-test-apropos'.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
184 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
185 ;; I haven't understood this :get stuff. The symbols with a |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
186 ;; custom-get property are stored here. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
187 (defvar cus-test-vars-with-custom-get nil |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
188 "Set by `cus-test-apropos' to a list of options with :get property.") |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
189 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
190 (defvar cus-test-vars-with-changed-state nil |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
191 "Set by `cus-test-apropos' to a list of options with state 'changed.") |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
192 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
193 (defvar cus-test-deps-errors nil |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
194 "List of require/load problems found by `cus-test-deps'.") |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
195 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
196 (defvar cus-test-deps-required nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
197 "List of dependencies required by `cus-test-deps'. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
198 Only unloaded features will be require'd.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
199 |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
200 (defvar cus-test-deps-loaded nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
201 "List of dependencies loaded by `cus-test-deps'.") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
202 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
203 (defvar cus-test-libs-errors nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
204 "List of load problems found by `cus-test-load-libs' or `cus-test-libs'.") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
205 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
206 (defvar cus-test-libs-loaded nil |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
207 "List of files loaded by `cus-test-load-libs' or `cus-test-libs'.") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
208 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
209 (defvar cus-test-vars-not-cus-loaded nil |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
210 "A list of options not loaded by `custom-load-symbol'. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
211 Set by `cus-test-noloads'.") |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
212 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
213 ;; (defvar cus-test-vars-cus-loaded nil |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
214 ;; "A list of options loaded by `custom-load-symbol'.") |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
215 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
216 (defun cus-test-apropos (regexp) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
217 "Check the options matching REGEXP. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
218 The detected problematic options are stored in `cus-test-errors'." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
219 (interactive "sVariable regexp: ") |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
220 (setq cus-test-errors nil) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
221 (setq cus-test-tested-variables nil) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
222 (mapc |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
223 (lambda (symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
224 (push symbol cus-test-tested-variables) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
225 ;; Be verbose in case we hang. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
226 (message "Cus Test running...%s %s" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
227 (length cus-test-tested-variables) symbol) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
228 (condition-case alpha |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
229 (let* ((type (custom-variable-type symbol)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
230 (conv (widget-convert type)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
231 (get (or (get symbol 'custom-get) 'default-value)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
232 values |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
233 mismatch) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
234 (when (default-boundp symbol) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
235 (push (funcall get symbol) values) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
236 (push (eval (car (get symbol 'standard-value))) values)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
237 (if (boundp symbol) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
238 (push (symbol-value symbol) values)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
239 ;; That does not work. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
240 ;; (push (widget-get conv :value) values) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
241 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
242 ;; Check the values |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
243 (mapc (lambda (value) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
244 (unless (widget-apply conv :match value) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
245 (setq mismatch 'mismatch))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
246 values) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
247 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
248 ;; Store symbols with a custom-get property. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
249 (when (get symbol 'custom-get) |
47886 | 250 (add-to-list 'cus-test-vars-with-custom-get symbol)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
251 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
252 ;; Changed outside the customize buffer? |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
253 ;; This routine is not very much tested. |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
254 (let ((c-value |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
255 (or (get symbol 'customized-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
256 (get symbol 'saved-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
257 (get symbol 'standard-value)))) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
258 (and (consp c-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
259 (boundp symbol) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
260 (not (equal (eval (car c-value)) (symbol-value symbol))) |
47886 | 261 (add-to-list 'cus-test-vars-with-changed-state symbol))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
262 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
263 (if mismatch |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
264 (push symbol cus-test-errors))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
265 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
266 (error |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
267 (push symbol cus-test-errors) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
268 (message "Error for %s: %s" symbol alpha)))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
269 (cus-test-get-options regexp)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
270 (message "%s options tested" |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
271 (length cus-test-tested-variables)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
272 (cus-test-errors-display)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
273 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
274 (defun cus-test-get-options (regexp) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
275 "Return a list of custom options matching REGEXP." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
276 (let (found) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
277 (mapatoms |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
278 (lambda (symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
279 (and |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
280 (or |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
281 ;; (user-variable-p symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
282 (get symbol 'standard-value) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
283 ;; (get symbol 'saved-value) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
284 (get symbol 'custom-type)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
285 (string-match regexp (symbol-name symbol)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
286 (not (member symbol cus-test-skip-list)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
287 (push symbol found)))) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
288 found)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
289 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
290 (defun cus-test-errors-display () |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
291 "Report about the errors found by cus-test." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
292 (with-output-to-temp-buffer "*cus-test-errors*" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
293 (set-buffer standard-output) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
294 (insert (format "Cus Test tested %s variables.\ |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
295 See `cus-test-tested-variables'.\n\n" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
296 (length cus-test-tested-variables))) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
297 (if (not cus-test-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
298 (insert "No errors found by cus-test.") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
299 (insert "The following variables seem to have problems:\n\n") |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
300 (dolist (e cus-test-errors) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
301 (insert (symbol-name e) "\n"))))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
302 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
303 (defun cus-test-load-custom-loads () |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
304 "Call `custom-load-symbol' on all atoms." |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
305 (interactive) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
306 (mapatoms 'custom-load-symbol) |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
307 (run-hooks 'cus-test-after-load-libs-hook)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
308 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
309 (defun cus-test-load-libs () |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
310 "Load the libraries with autoloads. |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
311 Don't load libraries in `cus-test-libs-noloads'." |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
312 (interactive) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
313 (setq cus-test-libs-errors nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
314 (setq cus-test-libs-loaded nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
315 (mapc |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
316 (lambda (file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
317 (condition-case alpha |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
318 (unless (member file cus-test-libs-noloads) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
319 (load file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
320 (push file cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
321 (error |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
322 (push (cons file alpha) cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
323 (message "Error for %s: %s" file alpha)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
324 (cus-test-get-autoload-deps)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
325 (message "%s libraries loaded successfully" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
326 (length cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
327 (if (not cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
328 (message "No load problems encountered") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
329 (message "The following load problems appeared:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
330 (cus-test-message cus-test-libs-errors)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
331 (run-hooks 'cus-test-after-load-libs-hook)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
332 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
333 (defun cus-test-get-autoload-deps () |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
334 "Return the list of libraries with autoloads." |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
335 (with-temp-buffer |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
336 (insert-file-contents (locate-library "loaddefs")) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
337 ;; This is from `customize-option'. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
338 (let (deps file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
339 (while |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
340 (search-forward "\n;;; Generated autoloads from " nil t) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
341 (goto-char (match-end 0)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
342 (setq file (buffer-substring (point) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
343 (progn (end-of-line) (point)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
344 (setq file (file-name-nondirectory file)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
345 (string-match "\\.el\\'" file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
346 (setq file (substring file 0 (match-beginning 0))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
347 (setq deps (nconc deps (list file)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
348 deps))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
349 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
350 (defun cus-test-message (list) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
351 "Print the members of LIST line by line." |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
352 (dolist (m list) (message "%s" m))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
353 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
354 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
355 ;;; The routines for batch mode: |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
356 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
357 (defun cus-test-opts () |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
358 "Test custom options. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
359 This function is suitable for batch mode. E.g., invoke |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
360 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
361 src/emacs -batch -l admin/cus-test.el -f cus-test-opts |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
362 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
363 in the Emacs source directory." |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
364 (interactive) |
47884
b475e8cf9b0a
Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47858
diff
changeset
|
365 (message "Running %s" 'cus-test-load-libs) |
b475e8cf9b0a
Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47858
diff
changeset
|
366 (cus-test-load-libs) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
367 (message "Running %s" 'cus-test-load-custom-loads) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
368 (cus-test-load-custom-loads) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
369 (message "Running %s" 'cus-test-apropos) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
370 (cus-test-apropos "") |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
371 (if (not cus-test-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
372 (message "No problems found") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
373 (message "The following options might have problems:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
374 (cus-test-message cus-test-errors))) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
375 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
376 (defun cus-test-deps () |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
377 "Run a verbose version of `custom-load-symbol' on all atoms. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
378 This function is suitable for batch mode. E.g., invoke |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
379 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
380 src/emacs -batch -l admin/cus-test.el -f cus-test-deps |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
381 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
382 in the Emacs source directory." |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
383 (interactive) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
384 (setq cus-test-deps-errors nil) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
385 (setq cus-test-deps-required nil) |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
386 (setq cus-test-deps-loaded nil) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
387 (mapatoms |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
388 ;; This code is mainly from `custom-load-symbol'. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
389 (lambda (symbol) |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
390 (let ((custom-load-recursion t)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
391 (dolist (load (get symbol 'custom-loads)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
392 (cond |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
393 ((symbolp load) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
394 ;; (condition-case nil (require load) (error nil)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
395 (condition-case alpha |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
396 (unless (featurep load) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
397 (require load) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
398 (push (list symbol load) cus-test-deps-required)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
399 (error |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
400 (push (list symbol load alpha) cus-test-deps-errors) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
401 (message "Require problem: %s %s %s" symbol load alpha)))) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
402 ((equal load "loaddefs") |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
403 (push |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
404 (message "Symbol %s has loaddefs as custom dependency" symbol) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
405 cus-test-deps-errors)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
406 ;; This is subsumed by the test below, but it's much |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
407 ;; faster. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
408 ((assoc load load-history)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
409 ;; This was just |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
410 ;; (assoc (locate-library load) load-history) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
411 ;; but has been optimized not to load locate-library |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
412 ;; if not necessary. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
413 ((let ((regexp (concat "\\(\\`\\|/\\)" (regexp-quote load) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
414 "\\(\\'\\|\\.\\)")) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
415 (found nil)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
416 (dolist (loaded load-history) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
417 (and (stringp (car loaded)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
418 (string-match regexp (car loaded)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
419 (setq found t))) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
420 found)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
421 ;; Without this, we would load cus-edit recursively. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
422 ;; We are still loading it when we call this, |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
423 ;; and it is not in load-history yet. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
424 ((equal load "cus-edit")) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
425 ;; This would ignore load problems with files in |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
426 ;; lisp/term/ |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
427 ;; ((locate-library (concat term-file-prefix load))) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
428 (t |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
429 ;; (condition-case nil (load load) (error nil)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
430 (condition-case alpha |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
431 (progn |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
432 (load load) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
433 (push (list symbol load) cus-test-deps-loaded)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
434 (error |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
435 (push (list symbol load alpha) cus-test-deps-errors) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
436 (message "Load Problem: %s %s %s" symbol load alpha)))) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
437 ))))) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
438 (message "%s features required" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
439 (length cus-test-deps-required)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
440 (message "%s files loaded" |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
441 (length cus-test-deps-loaded)) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
442 (if (not cus-test-deps-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
443 (message "No load problems encountered") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
444 (message "The following load problems appeared:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
445 (cus-test-message cus-test-deps-errors)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
446 (run-hooks 'cus-test-after-load-libs-hook)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
447 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
448 (defun cus-test-libs () |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
449 "Load the libraries with autoloads in separate processes. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
450 This function is useful to detect load problems of libraries. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
451 It is suitable for batch mode. E.g., invoke |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
452 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
453 src/emacs -batch -l admin/cus-test.el -f cus-test-libs |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
454 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
455 in the Emacs source directory." |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
456 (interactive) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
457 (with-temp-buffer |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
458 (setq cus-test-libs-errors nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
459 (setq cus-test-libs-loaded nil) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
460 (cd source-directory) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
461 (if (not (file-executable-p "src/emacs")) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
462 (error "No Emacs executable in %ssrc" default-directory)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
463 (mapc |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
464 (lambda (file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
465 (condition-case alpha |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
466 (let (fn cmd status) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
467 (setq fn (locate-library file)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
468 (if (not fn) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
469 (error "Library %s not found" file)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
470 (setq cmd (concat "src/emacs -batch -l " fn)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
471 (setq status (call-process shell-file-name nil nil nil |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
472 shell-command-switch cmd)) |
47889
9553f9fe9ad3
(cus-test-libs): Use equal instead of =.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47886
diff
changeset
|
473 (if (equal status 0) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
474 (message "%s" file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
475 (error "%s" status)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
476 (push file cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
477 (error |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
478 (push (cons file alpha) cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
479 (message "Error for %s: %s" file alpha)))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
480 (cus-test-get-autoload-deps)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
481 (message "Default Directory: %s" default-directory) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
482 (message "%s libraries had no load errors" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
483 (length cus-test-libs-loaded)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
484 (if (not cus-test-libs-errors) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
485 (message "No load problems encountered") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
486 (message "The following load problems appeared:") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
487 (cus-test-message cus-test-libs-errors)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
488 (run-hooks 'cus-test-after-load-libs-hook))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
489 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
490 (defun cus-test-noloads () |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
491 "Find custom options not loaded by `custom-load-symbol'. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
492 Calling this function after `cus-test-load-libs' is not meaningful. |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
493 It is suitable for batch mode. E.g., invoke |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
494 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
495 src/emacs -batch -l admin/cus-test.el -f cus-test-noloads |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
496 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
497 in the Emacs source directory." |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
498 (interactive) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
499 (let (cus-loaded) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
500 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
501 (message "Running %s" 'cus-test-load-custom-loads) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
502 (cus-test-load-custom-loads) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
503 (setq cus-loaded |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
504 (cus-test-get-options "")) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
505 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
506 (message "Running %s" 'cus-test-load-libs) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
507 (cus-test-load-libs) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
508 (setq cus-test-vars-not-cus-loaded |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
509 (cus-test-get-options "")) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
510 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
511 (dolist (o cus-loaded) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
512 (setq cus-test-vars-not-cus-loaded |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
513 (delete o cus-test-vars-not-cus-loaded))) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
514 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
515 (if (not cus-test-vars-not-cus-loaded) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
516 (message "No options not loaded by custom-load-symbol found") |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
517 (message "The following options were not loaded by custom-load-symbol:") |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
518 (cus-test-message |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
519 (sort cus-test-vars-not-cus-loaded 'string<))))) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
520 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
521 ;; And last but not least a quiz: |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
522 ;; |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
523 ;; Evaluation of the form (customize-option 'debug-on-error) yields a |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
524 ;; *Customize* buffer with a mismatch mess. Why? |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
525 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
526 (provide 'cus-test) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
527 |
52401 | 528 ;;; arch-tag: a4991a31-548d-48fb-8ba1-1ebbe68eb2e7 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
529 ;;; cus-test.el ends here |