Mercurial > hg > xemacs-beta
annotate tests/automated/keymap-tests.el @ 5886:c96000075e49
Be more careful about C integer overflow, #'parse-integer.
src/ChangeLog addition:
2015-04-08 Aidan Kehoe <kehoea@parhasard.net>
* data.c (parse_integer):
Fix a bug in my detecting a C overflow here.
tests/ChangeLog addition:
2015-04-08 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Add a couple of tests for #'parse-integer to check for a bug just
fixed.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 08 Apr 2015 21:03:18 +0100 |
parents | 21b5725c6a45 |
children |
rev | line source |
---|---|
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
1 ;; Copyright (C) 2012 Free Software Foundation, Inc. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
2 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
3 ;; Author: Aidan Kehoe <kehoea@parhasard.net> |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
4 ;; Maintainers: Aidan Kehoe <kehoea@parhasard.net> |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
5 ;; Created: 2012 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
6 ;; Keywords: tests |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
7 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
8 ;; This file is part of XEmacs. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
9 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
10 ;; XEmacs is free software: you can redistribute it and/or modify it |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
11 ;; under the terms of the GNU General Public License as published by the |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
12 ;; Free Software Foundation, either version 3 of the License, or (at your |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
13 ;; option) any later version. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
14 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
15 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
16 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
17 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
18 ;; for more details. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
19 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
21 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
22 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
23 ;;; Synched up with: Not in FSF. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
24 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
25 (let* ((map (make-keymap 'help-map-copy)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
26 (parent-map (make-keymap 'help-map-copy-parent)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
27 (help-map-copy t) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
28 (minor-mode-map-alist (acons 'help-map-copy map minor-mode-map-alist))) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
29 (set-keymap-parent map parent-map) |
5822
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
30 ;; Take care in choosing commands for these tests! Many of the commands |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
31 ;; here are defined in packages, which may not be available to make check. |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
32 (loop for (keys def) on '((shift tab) help-prev-symbol |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
33 tab help-next-symbol |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
34 c customize-variable |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
35 V find-variable-at-point |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
36 q help-mode-quit |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
37 f find-function-at-point |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
38 d describe-function-at-point |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
39 D describe-function-at-point |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
40 v describe-variable-at-point |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
41 i Info-elisp-ref |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
42 F find-function-at-point |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
43 Q help-mode-bury |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
44 button2 help-mouse-find-source-or-track |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
45 p help-prev-section |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
46 n help-next-section |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
47 return help-activate-function-or-scroll-up) |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
48 by #'cddr |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
49 do (define-key map (vector keys) def)) |
5822
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
50 (loop for (keys def) on '(u view-scroll-some-lines-down |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
51 % view-goto-percent |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
52 \2 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
53 p view-goto-percent |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
54 \? view-search-backward |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
55 - negative-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
56 k view-scroll-lines-down |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
57 backspace scroll-down |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
58 G view-last-windowful |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
59 f scroll-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
60 \5 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
61 s view-repeat-search |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
62 \0 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
63 n view-repeat-search |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
64 = what-line |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
65 \\ view-search-backward |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
66 delete scroll-down |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
67 \8 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
68 E view-file |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
69 d view-scroll-some-lines-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
70 \3 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
71 q view-quit |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
72 ! shell-command |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
73 (control j) view-scroll-lines-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
74 (control m) view-scroll-lines-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
75 y view-scroll-lines-down |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
76 linefeed view-scroll-lines-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
77 g view-goto-line |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
78 \6 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
79 t toggle-truncate-lines |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
80 C view-cleanup-backspaces |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
81 b scroll-down |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
82 \1 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
83 P view-buffer |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
84 return view-scroll-lines-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
85 | shell-command-on-region |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
86 j view-scroll-lines-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
87 \9 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
88 \' register-to-point |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
89 e view-scroll-lines-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
90 \4 digit-argument |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
91 r recenter |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
92 space scroll-up |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
93 / view-search-forward |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
94 N view-buffer |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
95 m point-to-register |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
96 h view-mode-describe |
21b5725c6a45
Reformat loops for readability and maintainability.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5821
diff
changeset
|
97 \7 digit-argument |
5821
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
98 describe-function-at-point view-mode-describe) |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
99 by #'cddr |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
100 do (define-key parent-map (vector keys) def)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
101 (Assert (eq (key-binding [F]) 'find-function-at-point) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
102 "checking normal key lookup works, F") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
103 (Assert (eq (key-binding [c]) 'customize-variable) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
104 "checking normal key lookup works, c") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
105 (Assert (eq (key-binding [\2]) 'digit-argument) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
106 "checking normal key parent lookup works, \\2") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
107 (Assert (eq (key-binding [|]) 'shell-command-on-region) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
108 "checking normal key parent lookup works, |") |
5821
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
109 (define-key map [remap describe-function-at-point] #'find-file) |
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
110 (Assert (eq (key-binding [D]) 'find-file) |
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
111 "checking remapped key lookup works, d") |
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
112 (Assert (eq (key-binding [d]) 'find-file) |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
113 "checking remapped key lookup works, f") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
114 (Assert (eq (key-binding [\2]) 'digit-argument) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
115 "checking normal key parent lookup works, \\2") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
116 (Assert (eq (key-binding [|]) 'shell-command-on-region) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
117 "checking normal key parent lookup works, |") |
5821
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
118 (Assert (eq (key-binding [describe-function-at-point]) 'view-mode-describe) |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
119 "checking remapped function doesn't affect key name mapping") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
120 (define-key parent-map [remap help-next-symbol] #'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
121 (Assert (eq (key-binding [tab]) 'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
122 "checking remapping in parent extends to child") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
123 (Assert (equal (commands-remapped-to 'find-file) |
5821
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
124 '(help-next-symbol describe-function-at-point)) |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
125 "checking #'commands-remapped-to is sane") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
126 (Check-Error wrong-type-argument (commands-remapped-to pi)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
127 (Check-Error wrong-type-argument (commands-remapped-to 'find-file pi)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
128 (Check-Error wrong-type-argument (commands-remapped-to 'find-file nil pi)) |
5821
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
129 (Assert (eq (command-remapping 'describe-function-at-point) 'find-file) |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
130 "checking #'command-remapping is sane") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
131 (Check-Error wrong-type-argument (command-remapping pi)) |
5821
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
132 (Check-Error wrong-type-argument (command-remapping 'describe-function-at-point |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
133 pi)) |
5821
e34c3557e14e
Avoid commands defined in packages in some tests.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
5793
diff
changeset
|
134 (Check-Error wrong-type-argument (command-remapping 'describe-function-at-point |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
135 nil pi))) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
136 |