Mercurial > emacs
annotate admin/cus-test.el @ 78083:4986050dd338
(cvs-reread-cvsrc, cvs-header-msg, cvs-checkout)
(cvs-mode-checkout, cvs-execute-single-file): Use new function names
strings->string and string->strings.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Sun, 08 Jul 2007 06:51:48 +0000 |
parents | 3d45362f1d38 |
children | 450fa81c5930 95d0cdf160ea |
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 |
75348 | 3 ;; Copyright (C) 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007 |
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 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
13 ;; GNU Emacs is free software; you can redistribute it and/or modify |
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 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
15 ;; the Free Software Foundation; either version 2, or (at your option) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
16 ;; any later version. |
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 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64079 | 25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
26 ;; Boston, MA 02110-1301, USA. | |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
27 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
28 ;;; Commentary: |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
29 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
30 ;; 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
|
31 ;; 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
|
32 ;; autoload dependencies. |
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 ;; 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
|
35 ;; |
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-opts |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
37 ;; |
47855
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-deps |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
39 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
40 ;; 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
|
41 ;; |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
42 ;; 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
|
43 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
44 ;; 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
|
45 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
46 ;; 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
|
47 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
48 ;; 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
|
49 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
50 ;; 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
|
51 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
52 ;; M-x cus-test-apropos RET |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
53 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
54 ;; 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
|
55 ;; variable `cus-test-errors'. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
56 ;; |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
57 ;; 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
|
58 ;; 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
|
59 ;; libraries. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
60 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
61 ;; 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
|
62 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
63 ;; loads all (!) custom dependencies and |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
64 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
65 ;; 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
|
66 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
67 ;; loads all (!) libraries with autoloads. |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
68 ;; |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
69 ;; 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
|
70 ;; 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
|
71 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
72 ;; `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
|
73 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
74 ;; 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
|
75 ;; 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
|
76 ;; |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
77 ;; `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
|
78 ;; |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
79 ;; 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
|
80 ;; those options further. |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
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-opts' tests many (all?) custom options. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
83 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
84 ;; 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
|
85 ;; but reports about load errors. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
86 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
87 ;; 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
|
88 ;; 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
|
89 ;; |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
90 ;; 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
|
91 ;; 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
|
92 ;; `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
|
93 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
94 ;; Some results from October 2002: |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
95 ;; |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
96 ;; 4523 options tested |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
97 ;; 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
|
98 ;; 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
|
99 ;; grep-tree-command |
b475e8cf9b0a
Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47858
diff
changeset
|
100 ;; grep-find-command |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
101 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
102 ;; 288 features required |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
103 ;; 10 files loaded |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
104 ;; 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
|
105 ;; (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
|
106 ;; 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
|
107 ;; (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
|
108 ;; (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
|
109 ;; (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
|
110 ;; (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
|
111 ;; ... |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
112 ;; |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
113 ;; 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
|
114 ;; 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
|
115 ;; (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
|
116 ;; (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
|
117 ;; (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
|
118 ;; |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
119 ;; 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
|
120 ;; 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
|
121 ;; 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
|
122 ;; 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
|
123 ;; 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
|
124 ;; 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
|
125 ;; 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
|
126 ;; 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
|
127 ;; 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
|
128 ;; 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
|
129 ;; refill-mode-hook |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
130 |
47889
9553f9fe9ad3
(cus-test-libs): Use equal instead of =.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47886
diff
changeset
|
131 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
132 ;;; Code: |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
133 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
134 ;;; 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
|
135 |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
136 (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
|
137 "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
|
138 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
139 (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
|
140 "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
|
141 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
142 (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
|
143 "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
|
144 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
145 ;; 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
|
146 ;; 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
|
147 ;; 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
|
148 (provide 'bbdb) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
149 (provide 'bbdb-com) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
150 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
151 ;; 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
|
152 ;; (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
|
153 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
154 ;; 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
|
155 (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
|
156 (add-to-list 'cus-test-libs-noloads "dunnet") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
157 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
158 ;; Never Viperize. |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
159 (setq viper-mode nil) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
160 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
161 ;; 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
|
162 (eval-after-load "saveplace" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
163 '(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
|
164 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
165 ;; 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
|
166 (setq save-abbrevs nil) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
167 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
168 ;; Avoid compile logs from adviced functions. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
169 (eval-after-load "bytecomp" |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
170 '(setq ad-default-compilation-action 'never)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
171 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
172 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
173 ;;; Main code: |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
174 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
175 ;; We want to log all messages. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
176 (setq message-log-max t) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
177 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
178 (require 'cus-edit) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
179 (require 'cus-load) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
180 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
181 (defvar cus-test-errors nil |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
182 "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
|
183 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
184 (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
|
185 "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
|
186 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
187 ;; 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
|
188 ;; 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
|
189 (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
|
190 "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
|
191 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
192 (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
|
193 "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
|
194 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
195 (defvar cus-test-deps-errors nil |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
196 "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
|
197 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
198 (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
|
199 "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
|
200 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
|
201 |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
202 (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
|
203 "List of dependencies loaded by `cus-test-deps'.") |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
204 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
205 (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
|
206 "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
|
207 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
208 (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
|
209 "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
|
210 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
211 (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
|
212 "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
|
213 Set by `cus-test-noloads'.") |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
214 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
215 ;; (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
|
216 ;; "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
|
217 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
218 (defun cus-test-apropos (regexp) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
219 "Check the options matching REGEXP. |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
220 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
|
221 (interactive "sVariable regexp: ") |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
222 (setq cus-test-errors nil) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
223 (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
|
224 (mapc |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
225 (lambda (symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
226 (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
|
227 ;; 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
|
228 (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
|
229 (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
|
230 (condition-case alpha |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
231 (let* ((type (custom-variable-type symbol)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
232 (conv (widget-convert type)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
233 (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
|
234 values |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
235 mismatch) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
236 (when (default-boundp symbol) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
237 (push (funcall get symbol) values) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
238 (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
|
239 (if (boundp symbol) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
240 (push (symbol-value symbol) values)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
241 ;; That does not work. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
242 ;; (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
|
243 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
244 ;; Check the values |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
245 (mapc (lambda (value) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
246 (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
|
247 (setq mismatch 'mismatch))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
248 values) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
249 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
250 ;; Store symbols with a custom-get property. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
251 (when (get symbol 'custom-get) |
47886 | 252 (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
|
253 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
254 ;; 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
|
255 ;; 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
|
256 (let ((c-value |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
257 (or (get symbol 'customized-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
258 (get symbol 'saved-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
259 (get symbol 'standard-value)))) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
260 (and (consp c-value) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
261 (boundp symbol) |
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
262 (not (equal (eval (car c-value)) (symbol-value symbol))) |
47886 | 263 (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
|
264 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
265 (if mismatch |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
266 (push symbol cus-test-errors))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
267 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
268 (error |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
269 (push symbol cus-test-errors) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
270 (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
|
271 (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
|
272 (message "%s options tested" |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
273 (length cus-test-tested-variables)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
274 (cus-test-errors-display)) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
275 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
276 (defun cus-test-get-options (regexp) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
277 "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
|
278 (let (found) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
279 (mapatoms |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
280 (lambda (symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
281 (and |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
282 (or |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
283 ;; (user-variable-p symbol) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
284 (get symbol 'standard-value) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
285 ;; (get symbol 'saved-value) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
286 (get symbol 'custom-type)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
287 (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
|
288 (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
|
289 (push symbol found)))) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
290 found)) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
291 |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
292 (defun cus-test-errors-display () |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
293 "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
|
294 (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
|
295 (set-buffer standard-output) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
296 (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
|
297 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
|
298 (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
|
299 (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
|
300 (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
|
301 (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
|
302 (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
|
303 (insert (symbol-name e) "\n"))))) |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
304 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
305 (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
|
306 "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
|
307 (interactive) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
308 (mapatoms 'custom-load-symbol) |
47815
a57526a55f0e
Clean up Workarounds. Shorten variable names. Use
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47804
diff
changeset
|
309 (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
|
310 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
311 (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
|
312 "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
|
313 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
|
314 (interactive) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
315 (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
|
316 (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
|
317 (mapc |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
318 (lambda (file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
319 (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
|
320 (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
|
321 (load file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
322 (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
|
323 (error |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
324 (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
|
325 (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
|
326 (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
|
327 (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
|
328 (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
|
329 (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
|
330 (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
|
331 (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
|
332 (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
|
333 (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
|
334 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
335 (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
|
336 "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
|
337 (with-temp-buffer |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
338 (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
|
339 ;; 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
|
340 (let (deps file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
341 (while |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
342 (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
|
343 (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
|
344 (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
|
345 (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
|
346 (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
|
347 (string-match "\\.el\\'" file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
348 (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
|
349 (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
|
350 deps))) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
351 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
352 (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
|
353 "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
|
354 (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
|
355 |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
356 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
357 ;;; The routines for batch mode: |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
358 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
359 (defun cus-test-opts () |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
360 "Test custom options. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
361 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
|
362 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
363 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
|
364 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
365 in the Emacs source directory." |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
366 (interactive) |
47884
b475e8cf9b0a
Undo previous change, but leave a comment.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47858
diff
changeset
|
367 (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
|
368 (cus-test-load-libs) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
369 (message "Running %s" 'cus-test-load-custom-loads) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
370 (cus-test-load-custom-loads) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
371 (message "Running %s" 'cus-test-apropos) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
372 (cus-test-apropos "") |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
373 (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
|
374 (message "No problems found") |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
375 (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
|
376 (cus-test-message cus-test-errors))) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
377 |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
378 (defun cus-test-deps () |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
379 "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
|
380 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
|
381 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
382 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
|
383 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
384 in the Emacs source directory." |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
385 (interactive) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
386 (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
|
387 (setq cus-test-deps-required nil) |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
388 (setq cus-test-deps-loaded nil) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
389 (mapatoms |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
390 ;; This code is mainly from `custom-load-symbol'. |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
391 (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
|
392 (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
|
393 (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
|
394 (cond |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
395 ((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
|
396 ;; (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
|
397 (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
|
398 (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
|
399 (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
|
400 (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
|
401 (error |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
402 (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
|
403 (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
|
404 ((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
|
405 (push |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
406 (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
|
407 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
|
408 ;; 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
|
409 ;; faster. |
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 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 ;; 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
|
412 ;; (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
|
413 ;; 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
|
414 ;; 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
|
415 ((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
|
416 "\\(\\'\\|\\.\\)")) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
417 (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
|
418 (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
|
419 (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
|
420 (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
|
421 (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
|
422 found)) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
423 ;; 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
|
424 ;; 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
|
425 ;; 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
|
426 ((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
|
427 ;; 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
|
428 ;; 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
|
429 ;; ((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
|
430 (t |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
431 ;; (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
|
432 (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
|
433 (progn |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
434 (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
|
435 (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
|
436 (error |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
437 (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
|
438 (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
|
439 ))))) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
440 (message "%s features required" |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
441 (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
|
442 (message "%s files loaded" |
47835
779560bedfb7
Supplementary streamlining.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47833
diff
changeset
|
443 (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
|
444 (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
|
445 (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
|
446 (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
|
447 (cus-test-message cus-test-deps-errors)) |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
448 (run-hooks 'cus-test-after-load-libs-hook)) |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
449 |
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
450 (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
|
451 "Load the libraries with autoloads in separate processes. |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
452 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
|
453 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
|
454 |
47833
330d29ed5c91
Extended and reorganized.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47815
diff
changeset
|
455 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
|
456 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
457 in the Emacs source directory." |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
458 (interactive) |
47855
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
459 (with-temp-buffer |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
460 (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
|
461 (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
|
462 (cd source-directory) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
463 (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
|
464 (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
|
465 (mapc |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
466 (lambda (file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
467 (condition-case alpha |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
468 (let (fn cmd status) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
469 (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
|
470 (if (not fn) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
471 (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
|
472 (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
|
473 (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
|
474 shell-command-switch cmd)) |
47889
9553f9fe9ad3
(cus-test-libs): Use equal instead of =.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47886
diff
changeset
|
475 (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
|
476 (message "%s" file) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
477 (error "%s" status)) |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
478 (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
|
479 (error |
ce2ef611f634
Further changes. Improve the reports from batch runs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47835
diff
changeset
|
480 (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
|
481 (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
|
482 (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
|
483 (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
|
484 (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
|
485 (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
|
486 (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
|
487 (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
|
488 (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
|
489 (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
|
490 (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
|
491 |
47894
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
492 (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
|
493 "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
|
494 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
|
495 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
|
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 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
|
498 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
499 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
|
500 (interactive) |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
501 (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
|
502 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
503 (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
|
504 (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
|
505 (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
|
506 (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
|
507 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
508 (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
|
509 (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
|
510 (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
|
511 (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
|
512 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
513 (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
|
514 (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
|
515 (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
|
516 |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
517 (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
|
518 (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
|
519 (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
|
520 (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
|
521 (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
|
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 ;; 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
|
524 ;; |
11b74e54eddf
Reworked. Added a new test cus-test-noloads. And a quiz.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
47889
diff
changeset
|
525 ;; 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
|
526 ;; *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
|
527 |
47801
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
528 (provide 'cus-test) |
6a024dc61d30
Initial version as part of GNU Emacs.
Markus Rost <rost@math.uni-bielefeld.de>
parents:
diff
changeset
|
529 |
52401 | 530 ;;; 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
|
531 ;;; cus-test.el ends here |