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