Mercurial > hg > xemacs-beta
annotate tests/automated/regexp-tests.el @ 5892:053ef01b71a8
Import the #'clear-string API from GNU, use it in tls.c
src/ChangeLog addition:
2015-04-18 Aidan Kehoe <kehoea@parhasard.net>
* sequence.c (Fclear_string): New, API from GNU. Zero a string's
contents, making sure the text is not kept around even when the
string's data is reallocated because of a changed character
length.
* sequence.c (syms_of_sequence): Make it available to Lisp.
* lisp.h: Make it available to C code.
* tls.c (nss_pk11_password): Use it.
* tls.c (gnutls_pk11_password): Use it.
* tls.c (openssl_password): Use it.
tests/ChangeLog addition:
2015-04-18 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Test #'clear-string, just added. Unfortunately there's no way to
be certain from Lisp that the old password data has been erased
after realloc; it may be worth adding a test to tests.c, but
*we'll be reading memory we shouldn't be*, so that gives me pause.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 18 Apr 2015 23:00:14 +0100 |
parents | 8a2ac78cb97d |
children |
rev | line source |
---|---|
446 | 1 ;;; -*- coding: iso-8859-1 -*- |
2 | |
1612 | 3 ;; Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
4 ;; Copyright (C) 2010 Ben Wing. |
446 | 5 |
6 ;; Author: Yoshiki Hayashi <yoshiki@xemacs.org> | |
1612 | 7 ;; Maintainer: Stephen J. Turnbull <stephen@xemacs.org> |
446 | 8 ;; Created: 2000 |
9 ;; Keywords: tests | |
10 | |
11 ;; This file is part of XEmacs. | |
12 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
13 ;; XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
14 ;; under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
15 ;; Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
16 ;; option) any later version. |
446 | 17 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
18 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
19 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
20 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
21 ;; for more details. |
446 | 22 |
23 ;; You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5136
diff
changeset
|
24 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
446 | 25 |
26 ;;; Synched up with: Not in FSF. | |
27 | |
28 ;;; Commentary: | |
29 | |
4897
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
30 ;; Test regular expressions. |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
31 |
4906
6ef8256a020a
implement equalp in C, fix case-folding, add equal() method for keymaps
Ben Wing <ben@xemacs.org>
parents:
4900
diff
changeset
|
32 ;; NOTE NOTE NOTE: There is some domain overlap among case-tests.el, |
6ef8256a020a
implement equalp in C, fix case-folding, add equal() method for keymaps
Ben Wing <ben@xemacs.org>
parents:
4900
diff
changeset
|
33 ;; regexp-tests.el and search-tests.el. See case-tests.el. |
446 | 34 |
35 (Check-Error-Message error "Trailing backslash" | |
36 (string-match "\\" "a")) | |
37 (Check-Error-Message error "Invalid preceding regular expression" | |
38 (string-match "a++" "a")) | |
39 (Check-Error-Message error "Invalid preceding regular expression" | |
40 (string-match "a**" "a")) | |
41 (Check-Error-Message error "Invalid preceding regular expression" | |
42 (string-match "a???" "a")) | |
43 (Check-Error-Message error "Unmatched \\[ or \\[^" | |
44 (string-match "[" "a")) | |
45 (Check-Error-Message error "Unmatched \\[ or \\[^" | |
46 (string-match "[abc" "a")) | |
47 (Check-Error-Message error "Unmatched ) or \\\\)" | |
48 (string-match "\\)" "a")) | |
49 (Check-Error-Message error "Invalid regular expression" | |
50 (string-match "\\(?.\\)" "a")) | |
51 (Check-Error-Message error "Unmatched \\\\{" | |
52 (string-match "a\\{" "a")) | |
53 (Check-Error-Message error "Invalid content of \\\\{\\\\}" | |
54 (string-match "a\\{a\\}" "a")) | |
55 | |
56 ;; exactn | |
57 | |
58 ;; string-match | |
59 (with-temp-buffer | |
60 ;; case-insensitive | |
61 (Assert (string-match "ä" "ä")) | |
62 (Assert (string-match "ä" "Ä")) | |
63 (Assert (string-match "Ä" "Ä")) | |
64 (Assert (string-match "Ä" "ä")) | |
65 ;; case-sensitive | |
66 (setq case-fold-search nil) | |
67 (Assert (string-match "ä" "ä")) | |
68 (Assert (not (string-match "ä" "Ä"))) | |
69 (Assert (string-match "Ä" "Ä")) | |
70 (Assert (not (string-match "Ä" "ä")))) | |
71 | |
5649
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
72 ;; Is posix-string-match passing the POSIX flag correctly? |
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
73 |
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
74 (Assert |
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
75 (equal |
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
76 (save-match-data |
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
77 (progn (posix-string-match "i\\|ii" "ii") (match-data))) |
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
78 '(0 2)) |
5653
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
79 "checking #'posix-string-match actually returns the longest match") |
5649
d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5648
diff
changeset
|
80 |
446 | 81 ;; looking-at |
82 (with-temp-buffer | |
83 (insert "äÄ") | |
84 ;; case-insensitive | |
85 (goto-char (point-min)) | |
86 (Assert (looking-at "ä")) | |
87 (Assert (looking-at "Ä")) | |
88 (forward-char) | |
89 (Assert (looking-at "ä")) | |
90 (Assert (looking-at "Ä")) | |
91 ;; case-sensitive | |
92 (setq case-fold-search nil) | |
93 (goto-char (point-min)) | |
94 (Assert (looking-at "ä")) | |
95 (Assert (not (looking-at "Ä"))) | |
96 (forward-char) | |
97 (Assert (not (looking-at "ä"))) | |
98 (Assert (looking-at "Ä"))) | |
99 | |
100 ;; re-search-forward and re-search-backward | |
101 (with-temp-buffer | |
102 (insert "äÄ") | |
103 ;; case insensitive | |
104 ;; forward | |
105 (goto-char (point-min)) | |
106 ;; Avoid trivial regexp. | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
107 (Assert (eq 2 (re-search-forward "ä\\|a" nil t))) |
446 | 108 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
109 (Assert (eq 2 (re-search-forward "Ä\\|a" nil t))) |
446 | 110 (goto-char (1+ (point-min))) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
111 (Assert (eq 3 (re-search-forward "ä\\|a" nil t))) |
446 | 112 (goto-char (1+ (point-min))) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
113 (Assert (eq 3 (re-search-forward "Ä\\|a" nil t))) |
446 | 114 ;; backward |
115 (goto-char (point-max)) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
116 (Assert (eq 2 (re-search-backward "ä\\|a" nil t))) |
446 | 117 (goto-char (point-max)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
118 (Assert (eq 2 (re-search-backward "Ä\\|a" nil t))) |
446 | 119 (goto-char (1- (point-max))) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
120 (Assert (eq 1 (re-search-backward "ä\\|a" nil t))) |
446 | 121 (goto-char (1- (point-max))) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
122 (Assert (eq 1 (re-search-backward "Ä\\|a" nil t))) |
446 | 123 ;; case sensitive |
124 (setq case-fold-search nil) | |
125 ;; forward | |
126 (goto-char (point-min)) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
127 (Assert (eq 2 (re-search-forward "ä\\|a" nil t))) |
446 | 128 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
129 (Assert (eq 3 (re-search-forward "Ä\\|a" nil t))) |
446 | 130 (goto-char (1+ (point-min))) |
131 (Assert (not (re-search-forward "ä\\|a" nil t))) | |
132 (goto-char (1+ (point-min))) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
133 (Assert (eq 3 (re-search-forward "Ä\\|a" nil t))) |
446 | 134 ;; backward |
135 (goto-char (point-max)) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
136 (Assert (eq 1 (re-search-backward "ä\\|a" nil t))) |
446 | 137 (goto-char (point-max)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
138 (Assert (eq 2 (re-search-backward "Ä\\|a" nil t))) |
446 | 139 (goto-char (1- (point-max))) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
140 (Assert (eq 1 (re-search-backward "ä\\|a" nil t))) |
446 | 141 (goto-char (1- (point-max))) |
142 (Assert (not (re-search-backward "Ä\\|a" nil t)))) | |
143 | |
144 ;; duplicate | |
145 (with-temp-buffer | |
146 ;; case insensitive | |
147 (Assert (string-match "^\\(ä\\)\\1$" "ää")) | |
148 (Assert (string-match "^\\(ä\\)\\1$" "äÄ")) | |
149 (Assert (string-match "^\\(ä\\)\\1$" "ÄÄ")) | |
150 (Assert (string-match "^\\(ä\\)\\1$" "Ää")) | |
151 (Assert (string-match "^\\(Ä\\)\\1$" "ää")) | |
152 (Assert (string-match "^\\(Ä\\)\\1$" "äÄ")) | |
153 (Assert (string-match "^\\(Ä\\)\\1$" "ÄÄ")) | |
154 (Assert (string-match "^\\(Ä\\)\\1$" "Ää")) | |
155 ;; case sensitive | |
156 (setq case-fold-search nil) | |
157 (Assert (string-match "^\\(ä\\)\\1$" "ää")) | |
158 (Assert (not (string-match "^\\(ä\\)\\1$" "äÄ"))) | |
159 (Assert (not (string-match "^\\(ä\\)\\1$" "ÄÄ"))) | |
160 (Assert (not (string-match "^\\(ä\\)\\1$" "Ää"))) | |
161 (Assert (not (string-match "^\\(Ä\\)\\1$" "ää"))) | |
162 (Assert (not (string-match "^\\(Ä\\)\\1$" "äÄ"))) | |
163 (Assert (string-match "^\\(Ä\\)\\1$" "ÄÄ")) | |
164 (Assert (not (string-match "^\\(Ä\\)\\1$" "Ää")))) | |
165 | |
1714 | 166 ;; multiple-match |
167 ;; Thanks to Manfred Bartz <MBartz@xix.com> | |
168 ;; c.e.x <vn4rkkm7ouf3b5@corp.supernews.com> | |
169 ;; #### Need to do repetitions of more complex regexps | |
170 ;; #### WASH ME! | |
171 (with-temp-buffer | |
172 (Assert (not (string-match "^a\\{4,4\\}$" "aaa"))) | |
173 (Assert (string-match "^a\\{4,4\\}$" "aaaa")) | |
174 (Assert (not (string-match "^a\\{4,4\\}$" "aaaaa"))) | |
175 (Assert (not (string-match "^[a]\\{4,4\\}$" "aaa"))) | |
176 (Assert (string-match "^[a]\\{4,4\\}$" "aaaa")) | |
177 (Assert (not (string-match "^[a]\\{4,4\\}$" "aaaaa"))) | |
178 (Assert (not (string-match "^\\(a\\)\\{4,4\\}$" "aaa"))) | |
179 (Assert (string-match "^\\(a\\)\\{4,4\\}$" "aaaa")) | |
180 (Assert (not (string-match "^\\(a\\)\\{4,4\\}$" "aaaaa"))) | |
181 ;; Use class because repetition of single char broken in 21.5.15 | |
182 (Assert (not (string-match "^[a]\\{3,5\\}$" "aa"))) | |
183 (Assert (string-match "^[a]\\{3,5\\}$" "aaa")) | |
184 (Assert (string-match "^[a]\\{3,5\\}$" "aaaa")) | |
185 (Assert (string-match "^[a]\\{3,5\\}$" "aaaaa")) | |
186 (Assert (not (string-match "^[a]\\{3,5\\}$" "aaaaaa"))) | |
187 (insert "\ | |
188 aa | |
189 aaa | |
190 aaaa | |
191 aaaaa | |
192 aaaaaa | |
193 baaaa | |
194 ") | |
195 (goto-char (point-min)) | |
196 (forward-line 1) | |
197 (Assert (not (looking-at "^a\\{4,4\\}$"))) | |
198 (forward-line 1) | |
199 (Assert (looking-at "^a\\{4,4\\}$")) | |
200 (forward-line 1) | |
201 (Assert (not (looking-at "^a\\{4,4\\}$"))) | |
202 (goto-char (point-min)) | |
203 (forward-line 1) | |
204 (Assert (not (looking-at "^[a]\\{4,4\\}$"))) | |
205 (forward-line 1) | |
206 (Assert (looking-at "^[a]\\{4,4\\}$")) | |
207 (forward-line 1) | |
208 (Assert (not (looking-at "^[a]\\{4,4\\}$"))) | |
209 (goto-char (point-min)) | |
210 (forward-line 1) | |
211 (Assert (not (looking-at "^\\(a\\)\\{4,4\\}$"))) | |
212 (forward-line 1) | |
213 (Assert (looking-at "^\\(a\\)\\{4,4\\}$")) | |
214 (forward-line 1) | |
215 (Assert (not (looking-at "^\\(a\\)\\{4,4\\}$"))) | |
216 ;; Use class because repetition of single char broken in 21.5.15 | |
217 (goto-char (point-min)) | |
218 (Assert (not (looking-at "^[a]\\{3,5\\}$"))) | |
219 (forward-line 1) | |
220 (Assert (looking-at "^[a]\\{3,5\\}$")) | |
221 (forward-line 1) | |
222 (Assert (looking-at "^[a]\\{3,5\\}$")) | |
223 (forward-line 1) | |
224 (Assert (looking-at "^[a]\\{3,5\\}$")) | |
225 (forward-line 1) | |
226 (Assert (not (looking-at "^[a]\\{3,5\\}$"))) | |
227 (goto-char (point-min)) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
228 (Assert (= 12 (re-search-forward "a\\{4,4\\}"))) |
1714 | 229 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
230 (Assert (= 12 (re-search-forward "b?a\\{4,4\\}"))) |
1714 | 231 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
232 (Assert (= 31 (re-search-forward "ba\\{4,4\\}"))) |
1714 | 233 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
234 (Assert (= 31 (re-search-forward "[b]a\\{4,4\\}"))) |
1714 | 235 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
236 (Assert (= 31 (re-search-forward "\\(b\\)a\\{4,4\\}"))) |
1714 | 237 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
238 (Assert (= 12 (re-search-forward "^a\\{4,4\\}"))) |
1714 | 239 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
240 (Assert (= 12 (re-search-forward "^a\\{4,4\\}$"))) |
1714 | 241 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
242 (Assert (= 12 (re-search-forward "[a]\\{4,4\\}"))) |
1714 | 243 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
244 (Assert (= 12 (re-search-forward "^[a]\\{4,4\\}"))) |
1714 | 245 (goto-char (point-min)) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
246 (Assert (= 12 (re-search-forward "^[a]\\{4,4\\}$"))) |
1714 | 247 ) |
248 | |
446 | 249 ;; charset, charset_not |
250 ;; Not called because it takes too much time. | |
251 (defun test-regexp-charset-paranoid () | |
252 (let ((i 0) | |
253 (max (expt 2 (if (featurep 'mule) 19 8))) | |
254 (range "[a-z]") | |
255 (range-not "[^a-z]") | |
256 char string) | |
257 (while (< i max) | |
258 (when (setq char (int-to-char i)) | |
259 (setq string (char-to-string char)) | |
260 (if (or (and (<= 65 i) | |
261 (<= i 90)) | |
262 (and (<= 97 i) | |
263 (<= i 122))) | |
264 (progn | |
265 (Assert (string-match range string)) | |
266 (Assert (not (string-match range-not string)))) | |
267 (Assert (not (string-match range string))) | |
268 (Assert (string-match range-not string)))) | |
269 (setq i (1+ i))))) | |
270 | |
271 ;; (test-regexp-charset-paranoid) | |
272 | |
273 ;; charset_mule, charset_mule_not | |
274 ;; Not called because it takes too much time. | |
275 (defun test-regex-charset-mule-paranoid () | |
276 (if (featurep 'mule) | |
277 (let ((i 0) | |
278 (max (expt 2 19)) | |
279 (range (format "[%c-%c]" | |
280 (make-char 'japanese-jisx0208 36 34) | |
281 (make-char 'japanese-jisx0208 36 42))) | |
282 (range-not (format "[^%c-%c]" | |
283 (make-char 'japanese-jisx0208 36 34) | |
284 (make-char 'japanese-jisx0208 36 42))) | |
285 (min-int (char-to-int (make-char 'japanese-jisx0208 36 34))) | |
286 (max-int (char-to-int (make-char 'japanese-jisx0208 36 42))) | |
287 char string) | |
288 (while (< i max) | |
289 (when (setq char (int-to-char i)) | |
290 (setq string (char-to-string char)) | |
291 (if (and (<= min-int i) | |
292 (<= i max-int)) | |
293 (progn | |
294 (Assert (string-match range string)) | |
295 (Assert (not (string-match range-not string)))) | |
296 (Assert (not (string-match range string))) | |
297 (Assert (string-match range-not string)))) | |
298 (setq i (1+ i)))))) | |
299 | |
300 ;; (test-regex-charset-mule-paranoid) | |
448 | 301 |
1472 | 302 ;; Test that replace-match does not clobber registers after a failed match |
448 | 303 (with-temp-buffer |
304 (insert "This is a test buffer.") | |
305 (goto-char (point-min)) | |
306 (search-forward "this is a test ") | |
307 (looking-at "Unmatchable text") | |
1472 | 308 (replace-match "") |
309 (Assert (looking-at "^buffer.$"))) | |
1024 | 310 |
311 ;; Test that trivial regexps reset unused registers | |
312 ;; Thanks to Martin Sternholm for the report. | |
313 ;; xemacs-beta <5blm6h2ki5.fsf@lister.roxen.com> | |
314 (with-temp-buffer | |
315 (insert "ab") | |
316 (goto-char (point-min)) | |
317 (re-search-forward "\\(a\\)") | |
1175 | 318 ;; test the whole-match data, too -- one attempted fix scotched that, too! |
1024 | 319 (Assert (string= (match-string 0) "a")) |
320 (Assert (string= (match-string 1) "a")) | |
321 (re-search-forward "b") | |
322 (Assert (string= (match-string 0) "b")) | |
323 (Assert (string= (match-string 1) nil))) | |
324 | |
325 ;; Test word boundaries | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
326 (Assert (= (string-match "\\<a" " a") 1)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
327 (Assert (= (string-match "a\\>" "a ") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
328 (Assert (= (string-match "\\ba" " a") 1)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
329 (Assert (= (string-match "a\\b" "a ") 0)) |
1024 | 330 ;; should work at target boundaries |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
331 (Assert (= (string-match "\\<a" "a") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
332 (Assert (= (string-match "a\\>" "a") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
333 (Assert (= (string-match "\\ba" "a") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
334 (Assert (= (string-match "a\\b" "a") 0)) |
1095 | 335 ;; Check for weirdness |
336 (Assert (not (string-match " \\> " " "))) | |
337 (Assert (not (string-match " \\< " " "))) | |
338 (Assert (not (string-match " \\b " " "))) | |
1024 | 339 ;; but not if the "word" would be on the null side of the boundary! |
340 (Assert (not (string-match "\\<" ""))) | |
341 (Assert (not (string-match "\\>" ""))) | |
342 (Assert (not (string-match " \\<" " "))) | |
343 (Assert (not (string-match "\\> " " "))) | |
344 (Assert (not (string-match "a\\<" "a"))) | |
345 (Assert (not (string-match "\\>a" "a"))) | |
1389 | 346 ;; Added Known-Bug 2002-09-09 sjt |
347 ;; Fixed bug 2003-03-21 sjt | |
348 (Assert (not (string-match "\\b" ""))) | |
349 (Assert (not (string-match "\\b" " "))) | |
350 (Assert (not (string-match " \\b" " "))) | |
351 (Assert (not (string-match "\\b " " "))) | |
1175 | 352 |
353 ;; Character classes are broken in Mule as of 21.5.9 | |
354 ;; Added Known-Bug 2002-12-27 | |
1413 | 355 ;; Fixed by Daiki Ueno 2003-03-24 |
1175 | 356 (if (featurep 'mule) |
357 ;; note: (int-to-char 65) => ?A | |
358 (let ((ch0 (make-char 'japanese-jisx0208 52 65)) | |
359 (ch1 (make-char 'japanese-jisx0208 51 65))) | |
360 (Assert (not (string-match "A" (string ch0)))) | |
361 (Assert (not (string-match "[A]" (string ch0)))) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
362 (Assert (eq (string-match "[^A]" (string ch0)) 0)) |
1175 | 363 (Assert (not (string-match "@A" (string ?@ ch0)))) |
1413 | 364 (Assert (not (string-match "@[A]" (string ?@ ch0)))) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
365 (Assert (eq (string-match "@[^A]" (string ?@ ch0)) 0)) |
1175 | 366 (Assert (not (string-match "@?A" (string ?@ ch0)))) |
367 (Assert (not (string-match "A" (string ch1)))) | |
368 (Assert (not (string-match "[A]" (string ch1)))) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
369 (Assert (eq (string-match "[^A]" (string ch1)) 0)) |
1175 | 370 (Assert (not (string-match "@A" (string ?@ ch1)))) |
371 (Assert (not (string-match "@[A]" (string ?@ ch1)))) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
372 (Assert (eq (string-match "@[^A]" (string ?@ ch1)) 0)) |
1413 | 373 (Assert (not (string-match "@?A" (string ?@ ch1)))) |
374 ) | |
375 ) | |
1195 | 376 |
377 ;; More stale match data tests. | |
378 ;; Thanks to <bjacob@ca.metsci.com>. | |
1425 | 379 ;; These tests used to fail because we cleared match data only on success. |
380 ;; Fixed 2003-04-17. | |
1612 | 381 ;; Must change sense of failing tests 2003-05-09. Too much code depends on |
382 ;; failed matches preserving match-data. | |
1472 | 383 (let ((a "a")) |
384 (Assert (string= (progn (string-match "a" a) | |
385 (string-match "b" a) | |
386 (match-string 0 a)) | |
387 a)) | |
388 (Assert (not (progn (string-match "a" a) | |
389 (string-match "b" a) | |
390 (match-string 1 a)))) | |
391 ;; test both for the second match is a plain string match and a regexp match | |
392 (Assert (string= (progn (string-match "\\(a\\)" a) | |
393 (string-match "\\(b\\)" a) | |
394 (match-string 0 a)) | |
395 a)) | |
396 (Assert (string= (progn (string-match "\\(a\\)" a) | |
397 (string-match "b" a) | |
398 (match-string 0 a)) | |
399 a)) | |
400 (Assert (string= (progn (string-match "\\(a\\)" a) | |
401 (string-match "\\(b\\)" a) | |
402 (match-string 1 a)) | |
403 a)) | |
404 (Assert (string= (progn (string-match "\\(a\\)" a) | |
405 (string-match "b" a) | |
406 (match-string 1 a)) | |
2542 | 407 a)) |
408 ;; in 21.4.16, registers from num_shy_groups to num_groups were not cleared, | |
409 ;; resulting in stale match data | |
410 (Assert (progn (string-match "\\(a\\)" a) | |
411 (string-match "\\(?:a\\)" a) | |
412 (not (match-beginning 1)))) | |
413 ) | |
2254 | 414 |
415 ;; bug identified by Katsumi Yamaoka 2004-09-03 <b9ywtzbbpue.fsf_-_@jpl.org> | |
416 ;; fix submitted by sjt 2004-09-08 | |
417 ;; trailing comments are values from buggy 21.4.15 | |
418 (let ((text "abc")) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
419 (Assert (eq 0 (string-match "\\(?:ab+\\)*c" text))) ; 2 |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
420 (Assert (eq 0 (string-match "^\\(?:ab+\\)*c" text))) ; nil |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
421 (Assert (eq 0 (string-match "^\\(?:ab+\\)*" text))) ; 0 |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
422 (Assert (eq 0 (string-match "^\\(?:ab+\\)c" text))) ; 0 |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
423 (Assert (eq 0 (string-match "^\\(?:ab\\)*c" text))) ; 0 |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
424 (Assert (eq 0 (string-match "^\\(?:a+\\)*b" text))) ; nil |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
425 (Assert (eq 0 (string-match "^\\(?:a\\)*b" text))) ; 0 |
2254 | 426 ) |
427 | |
2324 | 428 ;; per Steve Youngs 2004-09-30 <microsoft-free.87ekkjhj7t.fsf@youngs.au.com> |
429 ;; fix submitted by sjt 2004-10-07 | |
430 ;; trailing comments are values from buggy 21.4.pre16 | |
431 (let ((text "abc")) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
432 (Assert (eq 0 (string-match "\\(?:a\\(b\\)\\)" text))) ; 0 |
2324 | 433 (Assert (string= (match-string 1 text) "b")) ; ab |
434 (Assert (null (match-string 2 text))) ; b | |
435 (Assert (null (match-string 3 text))) ; nil | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
436 (Assert (eq 0 (string-match "\\(?:a\\(?:b\\(c\\)\\)\\)" text))) ; 0 |
2324 | 437 (Assert (string= (match-string 1 text) "c")) ; abc |
438 (Assert (null (match-string 2 text))) ; ab | |
439 (Assert (null (match-string 3 text))) ; c | |
440 (Assert (null (match-string 4 text))) ; nil | |
441 ) | |
442 | |
2542 | 443 ;; trivial subpatterns and backreferences with shy groups |
444 (let ((text1 "abb") | |
445 (text2 "aba") | |
446 (re0 "\\(a\\)\\(b\\)\\2") | |
447 (re1 "\\(?:a\\)\\(b\\)\\2") | |
448 (re2 "\\(?:a\\)\\(b\\)\\1") | |
449 (re3 "\\(a\\)\\(?:b\\)\\1")) | |
450 | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
451 (Assert (eq 0 (string-match re0 text1))) |
2542 | 452 (Assert (string= text1 (match-string 0 text1))) |
453 (Assert (string= "a" (match-string 1 text1))) | |
454 (Assert (string= "b" (match-string 2 text1))) | |
455 (Assert (null (string-match re0 text2))) | |
456 | |
457 (Check-Error-Message 'invalid-regexp "Invalid back reference" | |
458 (string-match re1 text1)) | |
459 | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
460 (Assert (eq 0 (string-match re2 text1))) |
2542 | 461 (Assert (string= text1 (match-string 0 text1))) |
462 (Assert (string= "b" (match-string 1 text1))) | |
463 (Assert (null (match-string 2 text1))) | |
464 (Assert (null (string-match re2 text2))) | |
465 | |
466 (Assert (null (string-match re3 text1))) | |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
467 (Assert (eq 0 (string-match re3 text2))) |
2542 | 468 (Assert (string= text2 (match-string 0 text2))) |
469 (Assert (string= "a" (match-string 1 text2))) | |
470 (Assert (null (match-string 2 text2))) | |
471 ) | |
472 | |
4199 | 473 ;; replace-regexp-in-string (regexp rep source |
474 ;; fixedcase literal buf-or-subexp start) | |
475 | |
476 ;; Currently we test the following cases: | |
477 ;; where `cbuf' and `bar-or-empty' are bound below. | |
478 | |
479 ;; #### Tests for the various functional features (fixedcase, literal, start) | |
480 ;; should be added. | |
481 | |
482 (with-temp-buffer | |
483 (flet ((bar-or-empty (subexp) (if (string= subexp "foo") "bar" ""))) | |
484 (let ((cbuf (current-buffer))) | |
485 (dolist (test-case | |
486 ;; REP BUF-OR-SUBEXP EXPECTED RESULT | |
487 `(("bar" nil " bar") | |
488 ("bar" ,cbuf " bar") | |
489 ("bar" 0 " bar") | |
490 ("bar" 1 " bar foo") | |
491 (bar-or-empty nil " ") | |
492 (bar-or-empty ,cbuf " ") | |
493 (bar-or-empty 0 " ") | |
494 (bar-or-empty 1 " bar foo"))) | |
495 (Assert | |
496 (string= | |
497 (nth 2 test-case) | |
498 (replace-regexp-in-string "\\(foo\\).*\\'" (nth 0 test-case) | |
499 " foo foo" nil nil (nth 1 test-case))))) | |
500 ;; #### Why doesn't this loop work right? | |
501 ; (dolist (test-case | |
502 ; ;; REP BUF-OR-SUBEXP EXPECTED ERROR EXPECTED MESSAGE | |
503 ; `(;; expected message was "bufferp, symbol" up to 21.5.28 | |
504 ; ("bar" 'symbol wrong-type-argument "integerp, symbol") | |
505 ; ("bar" -1 invalid-argument | |
506 ; "match data register invalid, -1") | |
507 ; ("bar" 2 invalid-argument | |
508 ; "match data register not set, 2") | |
509 ; )) | |
510 ; (eval | |
511 ; `(Check-Error-Message ,(nth 2 test-case) ,(nth 3 test-case) | |
512 ; (replace-regexp-in-string "\\(foo\\).*\\'" ,(nth 0 test-case) | |
513 ; " foo foo" nil nil ,(nth 1 test-case))))) | |
514 ;; #### Can't test the message with w-t-a, see test-harness.el. | |
515 (Check-Error wrong-type-argument | |
516 (replace-regexp-in-string "\\(foo\\).*\\'" | |
517 "bar" | |
518 " foo foo" nil nil | |
519 'symbol)) | |
520 ;; #### Can't test the FROB (-1), see test-harness.el. | |
521 (Check-Error-Message invalid-argument | |
522 "match data register invalid" | |
523 (replace-regexp-in-string "\\(foo\\).*\\'" | |
524 "bar" | |
525 " foo foo" nil nil | |
526 -1)) | |
527 ;; #### Can't test the FROB (-1), see test-harness.el. | |
528 (Check-Error-Message invalid-argument | |
529 "match data register not set" | |
530 (replace-regexp-in-string "\\(foo\\).*\\'" | |
531 "bar" | |
532 " foo foo" nil nil | |
533 2)) | |
534 ))) | |
535 | |
4504
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
536 ;; Not very comprehensive tests of skip-chars-forward, skip-chars-background: |
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
537 |
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
538 (with-string-as-buffer-contents |
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
539 "-]-----------------------------][]]------------------------" |
4517
5e8f6469169f
Fix up initial condition for skip-chars test.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4504
diff
changeset
|
540 (goto-char (point-min)) |
4504
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
541 (skip-chars-forward (skip-chars-quote "-[]")) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
542 (Assert (= (point) (point-max))) |
4504
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
543 (skip-chars-backward (skip-chars-quote "-[]")) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
544 (Assert (= (point) (point-min))) |
4504
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
545 ;; Testing in passing for an old bug in #'skip-chars-forward where I |
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
546 ;; thought it was impossible to call it with a string containing only ?- |
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
547 ;; and ?]: |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
548 (Assert (= (skip-chars-forward (skip-chars-quote "-]")) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
549 (position ?[ (buffer-string) :test #'=))) |
4504
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
550 ;; This used to error, incorrectly: |
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
551 (Assert (skip-chars-quote "[-"))) |
b82fdf7305ee
Correct the implementation, add a few basic tests for #'skip-chars-quote.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4199
diff
changeset
|
552 |
4199 | 553 ;; replace-match (REPLACEMENT &optional FIXEDCASE LITERAL STRING STRBUFFER) |
554 | |
555 ;; #### Write some tests! Much functionality is implicitly tested above | |
556 ;; via `replace-regexp-in-string', but we should specifically test bogus | |
557 ;; combinations of STRING and STRBUFFER. | |
558 | |
4518
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
559 ;; empty string at point |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
560 ;; Thanks Julian Bradford on XEmacs Beta |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
561 ;; <18652.54975.894512.880956@krk.inf.ed.ac.uk> |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
562 (with-string-as-buffer-contents "aáa" |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
563 (goto-char (point-min)) |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
564 (Assert (looking-at "\\=")) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
565 (Assert (= (re-search-forward "\\=") 1)) |
4518
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
566 (forward-char 1) |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
567 (Assert (looking-at "\\=")) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
568 (Assert (= (re-search-forward "\\=") 2)) |
4518
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
569 (forward-char 1) |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
570 (Assert (looking-at "\\=")) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
571 (Assert (= (re-search-forward "\\=") 3)) |
4518
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
572 (forward-char 1) |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
573 (Assert (looking-at "\\=")) |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
574 (Assert (= (re-search-forward "\\=") 4))) |
4518
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
575 |
e0a8c796f955
Add test for at_dot regexp.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4517
diff
changeset
|
576 |
4897
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
577 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
578 ;; Tests involving case-changing replace-match ;; |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
579 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
580 |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
581 (Assert (not (string-match "\\(\\.\\=\\)" "."))) |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
582 (Assert (string= "" (let ((str "test string")) |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
583 (if (string-match "^.*$" str) |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
584 (replace-match "\\U" t nil str))))) |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
585 (with-temp-buffer |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
586 (erase-buffer) |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
587 (insert "test string") |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
588 (re-search-backward "^.*$") |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
589 (replace-match "\\U" t) |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
590 (Assert (and (bobp) (eobp)))) |
91a023144e72
fix longstanding search bug involving searching for Control-1 chars
Ben Wing <ben@xemacs.org>
parents:
4855
diff
changeset
|
591 |
4900
0eccfd4850d6
Add tests for the regexp-ranges-treat-control-1-chars badly bug.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4897
diff
changeset
|
592 ;; Control-1 characters were second-class citizens in regexp ranges |
0eccfd4850d6
Add tests for the regexp-ranges-treat-control-1-chars badly bug.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4897
diff
changeset
|
593 ;; for a while there. Addressed in Ben's Mercurial changeset |
0eccfd4850d6
Add tests for the regexp-ranges-treat-control-1-chars badly bug.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4897
diff
changeset
|
594 ;; 2e15c29cc2b3; attempt to ensure this doesn't happen again. |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
595 (Assert (eql (string-match "[\x00-\x7f\x80-\x9f]" "a") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
596 (Assert (eql (string-match "[\x00-\x7f\x80-\x9f]" "é") nil)) |
4900
0eccfd4850d6
Add tests for the regexp-ranges-treat-control-1-chars badly bug.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4897
diff
changeset
|
597 ;; Gave nil in 21.5 for a couple of years. |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
598 (Assert (eql (string-match "[\x00-\x7f\x80-\x9f]" "\x80") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
599 (Assert (eql (string-match "[\x00-\x7f]\\|[\x80-\x9f]" "\x80") 0)) |
4900
0eccfd4850d6
Add tests for the regexp-ranges-treat-control-1-chars badly bug.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4897
diff
changeset
|
600 ;; Gave nil |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
601 (Assert (eql (string-match "[\x7f\x80-\x9f]" "\x80") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
602 (Assert (eql (string-match "[\x80-\x9f]" "\x80") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
603 (Assert (eql (string-match "[\x7f\x80-\x9e]" "\x80") 0)) |
4900
0eccfd4850d6
Add tests for the regexp-ranges-treat-control-1-chars badly bug.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4897
diff
changeset
|
604 ;; Used to succeed even with the bug. |
5136
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
605 (Assert (eql (string-match "[\x7f\x80\x9f]" "\x80") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
606 (Assert (eql (string-match "[\x7e\x80-\x9f]" "\x80") 0)) |
0f66906b6e37
Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically
Ben Wing <ben@xemacs.org>
parents:
4906
diff
changeset
|
607 (Assert (eql (string-match "[\x7f\x81-\x9f]" "\x81") 0)) |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
608 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
609 ;; Test character classes |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
610 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
611 ;; This used not to error: |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
612 (Check-Error-Message invalid-regexp "Invalid character class name" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
613 (string-match "[[:alnum12345:]]" "a")) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
614 ;; This alwayed errored, as long as character classes were turned on |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
615 (Check-Error-Message invalid-regexp "Invalid character class name" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
616 (string-match "[[:alnum1234:]]" "a")) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
617 |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
618 (macrolet |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
619 ((Assert-char-class (class matching-char non-matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
620 (if (and (not (featurep 'mule)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
621 (or (eq (car-safe matching-char) 'decode-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
622 (eq (car-safe non-matching-char) 'decode-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
623 ;; Don't attempt expansion if these clauses require Mule and we |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
624 ;; don't have it. |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
625 (return-from Assert-char-class nil) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
626 (setq matching-char (eval matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
627 non-matching-char (eval non-matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
628 `(progn |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
629 (Assert (eql (string-match ,(concat "[" class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
630 ,(concat (string matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
631 (string non-matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
632 0)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
633 (Assert (eql (string-match ,(concat "[" class class class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
634 ,(concat (string matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
635 (string non-matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
636 0)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
637 (Assert (eql (string-match ,(concat "[^" class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
638 ,(concat (string non-matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
639 (string matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
640 0)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
641 (Assert (eql (string-match ,(concat "[^" class class class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
642 ,(concat (string non-matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
643 (string matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
644 0)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
645 (Assert (eql (string-match ,(concat "[" class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
646 ,(concat (string non-matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
647 (string matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
648 1)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
649 (Assert (eql (string-match ,(concat "[" class class class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
650 ,(concat (string non-matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
651 (string matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
652 1)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
653 (Assert (eql (string-match ,(concat "[^" class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
654 ,(concat (string matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
655 (string non-matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
656 1)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
657 (Assert (eql (string-match ,(concat "[^" class class class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
658 ,(concat (string matching-char) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
659 (string non-matching-char))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
660 1)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
661 (Assert (null (string-match ,(concat "[" class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
662 ,(string non-matching-char)))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
663 (Assert (null (string-match ,(concat "[^" class "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
664 ,(string matching-char)))) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
665 (Assert (null (string-match ,(concat "[^" class |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
666 (string non-matching-char) "]") |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
667 ,(concat (string matching-char) |
5653
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
668 (string non-matching-char))))) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
669 (let ((old-case-fold-search case-fold-search)) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
670 (with-temp-buffer |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
671 (setq case-fold-search old-case-fold-search) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
672 (insert-char ,matching-char 20) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
673 (insert-char ,non-matching-char 20) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
674 (goto-char (point-min)) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
675 (Assert (eql (skip-chars-forward ,class) 20) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
676 ,(format "making sure %s skips %S forward" |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
677 class matching-char)) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
678 (Assert (eql (skip-chars-forward ,(concat "^" class)) 20) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
679 ,(format "making sure ^%s skips %S forward" |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
680 class non-matching-char)) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
681 (Assert (eql (skip-chars-backward ,(concat "^" class)) -20) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
682 ,(format "making sure ^%s skips %S backward" |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
683 class non-matching-char)) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
684 (Assert (eql (skip-chars-backward ,class) -20) |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
685 ,(format "making sure %s skips %S backward" |
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
686 class matching-char)))))) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
687 (Assert-never-matching (class &rest characters) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
688 (cons |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
689 'progn |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
690 (mapcan #'(lambda (character) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
691 (if (or (not (eq 'decode-char (car-safe character))) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
692 (featurep 'mule)) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
693 `((Assert (null (string-match |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
694 ,(concat "[" class "]") |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
695 ,(string (eval character))))) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
696 (Assert (eql (string-match |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
697 ,(concat "[^" class "]") |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
698 ,(string (eval character))) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
699 0))))) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
700 characters)))) |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
701 (Assert-char-class "[:alpha:]" ?a ?0) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
702 (Assert-char-class "[:alpha:]" ?z ?9) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
703 (Assert-char-class "[:alpha:]" ?A ?0) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
704 (Assert-char-class "[:alpha:]" ?Z ?9) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
705 (Assert-char-class "[:alpha:]" ?b ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
706 (Assert-char-class "[:alpha:]" ?c ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
707 (Assert-char-class "[:alpha:]" ?d ?\ ) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
708 (Assert-char-class "[:alpha:]" ?e ?\x7f) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
709 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
710 "[:alpha:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
711 (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
712 (decode-char 'ucs #x2116)) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
713 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
714 "[:alpha:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
715 (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
716 ?\x02) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
717 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
718 "[:alpha:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
719 (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
720 (decode-char 'ucs #x0385)) ;; GREEK DIALYTIKA TONOS |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
721 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
722 (Assert-char-class "[:alnum:]" ?a ?.) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
723 (Assert-char-class "[:alnum:]" ?z ?') |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
724 (Assert-char-class "[:alnum:]" ?A ?/) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
725 (Assert-char-class "[:alnum:]" ?Z ?!) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
726 (Assert-char-class "[:alnum:]" ?0 ?,) |
5653
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
727 (Assert-char-class "[:alnum:]" ?9 ?\t) |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
728 (Assert-char-class "[:alnum:]" ?b ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
729 (Assert-char-class "[:alnum:]" ?c ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
730 (Assert-char-class "[:alnum:]" ?d ?\ ) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
731 (Assert-char-class "[:alnum:]" ?e ?\x7f) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
732 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
733 "[:alnum:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
734 (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
735 (decode-char 'ucs #x2116)) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
736 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
737 "[:alnum:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
738 (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
739 ?\x02) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
740 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
741 "[:alnum:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
742 (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
743 (decode-char 'ucs #x0385)) ;; GREEK DIALYTIKA TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
744 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
745 (Assert-char-class "[:word:]" ?a ?.) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
746 (Assert-char-class "[:word:]" ?z ?') |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
747 (Assert-char-class "[:word:]" ?A ?/) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
748 (Assert-char-class "[:word:]" ?Z ?!) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
749 (Assert-char-class "[:word:]" ?0 ?,) |
5653
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
750 (Assert-char-class "[:word:]" ?9 ?\t) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
751 (Assert-char-class "[:word:]" ?b ?\x00) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
752 (Assert-char-class "[:word:]" ?c ?\x09) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
753 (Assert-char-class "[:word:]" ?d ?\ ) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
754 (Assert-char-class "[:word:]" ?e ?\x7f) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
755 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
756 "[:word:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
757 (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
758 (decode-char 'ucs #x2116)) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
759 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
760 "[:word:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
761 (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
762 ?\x02) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
763 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
764 "[:word:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
765 (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
766 (decode-char 'ucs #x0385)) ;; GREEK DIALYTIKA TONOS |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
767 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
768 (let ((case-fold-search nil)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
769 (Assert-char-class "[:upper:]" ?A ?a) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
770 (Assert-char-class "[:upper:]" ?Z ?z) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
771 (Assert-char-class "[:upper:]" ?B ?0) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
772 (Assert-char-class "[:upper:]" ?C ?9) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
773 (Assert-char-class "[:upper:]" ?D ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
774 (Assert-char-class "[:upper:]" ?E ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
775 (Assert-char-class "[:upper:]" ?F ?\ ) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
776 (Assert-char-class "[:upper:]" ?G ?\x7f) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
777 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
778 "[:upper:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
779 (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
780 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
781 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
782 "[:upper:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
783 (decode-char 'ucs #x0392) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
784 (decode-char 'ucs #x5357)) ;; kDefinition south; southern part; southward |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
785 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
786 (Assert-char-class "[:lower:]" ?a ?A) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
787 (Assert-char-class "[:lower:]" ?z ?Z) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
788 (Assert-char-class "[:lower:]" ?b ?0) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
789 (Assert-char-class "[:lower:]" ?c ?9) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
790 (Assert-char-class "[:lower:]" ?d ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
791 (Assert-char-class "[:lower:]" ?e ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
792 (Assert-char-class "[:lower:]" ?f ? ) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
793 (Assert-char-class "[:lower:]" ?g ?\x7f) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
794 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
795 "[:lower:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
796 (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
797 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
798 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
799 "[:lower:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
800 (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
801 (decode-char 'ucs #x5357)));; kDefinition south; southern part; southward |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
802 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
803 (let ((case-fold-search t)) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
804 (Assert-char-class "[:upper:]" ?a ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
805 (Assert-char-class "[:upper:]" ?z ?\x01) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
806 (Assert-char-class "[:upper:]" ?b ?{) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
807 (Assert-char-class "[:upper:]" ?c ?}) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
808 (Assert-char-class "[:upper:]" ?d ?<) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
809 (Assert-char-class "[:upper:]" ?e ?>) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
810 (Assert-char-class "[:upper:]" ?f ?\ ) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
811 (Assert-char-class "[:upper:]" ?g ?\x7f) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
812 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
813 "[:upper:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
814 (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
815 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
816 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
817 "[:upper:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
818 (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
819 (decode-char 'ucs #x5357)) ;; kDefinition south; southern part; southward |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
820 (Assert-char-class "[:lower:]" ?A ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
821 (Assert-char-class "[:lower:]" ?Z ?\x01) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
822 (Assert-char-class "[:lower:]" ?B ?{) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
823 (Assert-char-class "[:lower:]" ?C ?}) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
824 (Assert-char-class "[:lower:]" ?D ?<) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
825 (Assert-char-class "[:lower:]" ?E ?>) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
826 (Assert-char-class "[:lower:]" ?F ?\ ) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
827 (Assert-char-class "[:lower:]" ?G ?\x7F) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
828 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
829 "[:lower:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
830 (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
831 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
832 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
833 "[:lower:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
834 (decode-char 'ucs #x0392) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
835 (decode-char 'ucs #x5357)));; kDefinition south; southern part; southward |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
836 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
837 (Assert-char-class "[:digit:]" ?0 ?a) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
838 (Assert-char-class "[:digit:]" ?9 ?z) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
839 (Assert-char-class "[:digit:]" ?1 ?A) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
840 (Assert-char-class "[:digit:]" ?2 ?Z) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
841 (Assert-char-class "[:digit:]" ?3 ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
842 (Assert-char-class "[:digit:]" ?4 ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
843 (Assert-char-class "[:digit:]" ?5 ? ) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
844 (Assert-char-class "[:digit:]" ?6 ?\x7f) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
845 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
846 "[:digit:]" ?7 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
847 (decode-char 'ucs #x0385)) ;; GREEK DIALYTIKA TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
848 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
849 "[:digit:]" ?8 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
850 (decode-char 'ucs #x0392)) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
851 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
852 "[:digit:]" ?9 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
853 (decode-char 'ucs #x03B2)) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
854 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
855 "[:digit:]" ?0 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
856 (decode-char 'ucs #x0410)) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
857 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
858 "[:digit:]" ?1 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
859 (decode-char 'ucs #x0430)) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
860 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
861 "[:digit:]" ?2 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
862 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
863 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
864 "[:digit:]" ?3 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
865 (decode-char 'ucs #x2116)) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
866 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
867 "[:digit:]" ?4 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
868 (decode-char 'ucs #x5357)) ;; kDefinition south; southern part; southward |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
869 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
870 (Assert-char-class "[:xdigit:]" ?0 ?g) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
871 (Assert-char-class "[:xdigit:]" ?9 ?G) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
872 (Assert-char-class "[:xdigit:]" ?A ?{) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
873 (Assert-char-class "[:xdigit:]" ?a ?}) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
874 (Assert-char-class "[:xdigit:]" ?1 ? ) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
875 (Assert-char-class "[:xdigit:]" ?2 ?Z) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
876 (Assert-char-class "[:xdigit:]" ?3 ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
877 (Assert-char-class "[:xdigit:]" ?4 ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
878 (Assert-char-class "[:xdigit:]" ?5 ?\x7f) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
879 (Assert-char-class "[:xdigit:]" ?6 ?z) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
880 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
881 "[:xdigit:]" ?7 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
882 (decode-char 'ucs #x0385)) ;; GREEK DIALYTIKA TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
883 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
884 "[:xdigit:]" ?8 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
885 (decode-char 'ucs #x0392)) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
886 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
887 "[:xdigit:]" ?9 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
888 (decode-char 'ucs #x03B2)) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
889 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
890 "[:xdigit:]" ?a |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
891 (decode-char 'ucs #x0410)) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
892 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
893 "[:xdigit:]" ?B |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
894 (decode-char 'ucs #x0430)) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
895 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
896 "[:xdigit:]" ?c |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
897 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
898 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
899 "[:xdigit:]" ?D |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
900 (decode-char 'ucs #x2116)) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
901 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
902 "[:xdigit:]" ?e |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
903 (decode-char 'ucs #x5357)) ;; kDefinition south; southern part; southward |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
904 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
905 (Assert-char-class "[:space:]" ?\ ?0) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
906 (Assert-char-class "[:space:]" ?\t ?9) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
907 (Assert-char-class "[:space:]" ?\ ?A) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
908 (Assert-char-class "[:space:]" ?\t ?Z) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
909 (Assert-char-class "[:space:]" ?\ ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
910 (Assert-char-class "[:space:]" ?\ ?\x7f) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
911 (Assert-char-class "[:space:]" ?\t ?a) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
912 (Assert-char-class "[:space:]" ?\ ?z) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
913 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
914 "[:space:]" ?\ |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
915 (decode-char 'ucs #x0385)) ;; GREEK DIALYTIKA TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
916 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
917 "[:space:]" ?\t |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
918 (decode-char 'ucs #x0392)) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
919 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
920 "[:space:]" ?\ |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
921 (decode-char 'ucs #x03B2)) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
922 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
923 "[:space:]" ?\t |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
924 (decode-char 'ucs #x0410)) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
925 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
926 "[:space:]" ?\ |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
927 (decode-char 'ucs #x0430)) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
928 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
929 "[:space:]" ?\t |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
930 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
931 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
932 "[:space:]" ?\ |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
933 (decode-char 'ucs #x2116)) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
934 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
935 "[:space:]" ?\t |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
936 (decode-char 'ucs #x5357)) ;; kDefinition south; southern part; southward |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
937 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
938 (Assert-char-class "[:print:]" ?\ ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
939 (Assert-char-class "[:print:]" ?0 ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
940 (Assert-char-class "[:print:]" ?9 ?\x7f) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
941 (Assert-char-class "[:print:]" ?A ?\x01) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
942 (Assert-char-class "[:print:]" ?Z ?\x02) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
943 (Assert-char-class "[:print:]" ?B ?\t) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
944 (Assert-char-class "[:print:]" ?a ?\x03) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
945 (Assert-char-class "[:print:]" ?z ?\x04) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
946 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
947 "[:print:]" (decode-char 'ucs #x0385) ;; GREEK DIALYTIKA TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
948 ?\x05) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
949 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
950 "[:print:]" (decode-char 'ucs #x0392) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
951 ?\x06) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
952 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
953 "[:print:]" (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
954 ?\x07) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
955 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
956 "[:print:]" (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
957 ?\x08) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
958 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
959 "[:print:]" (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
960 ?\x09) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
961 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
962 "[:print:]" (decode-char 'ucs #x0686) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
963 ?\x0a) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
964 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
965 "[:print:]" (decode-char 'ucs #x2116) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
966 ?\x0b) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
967 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
968 "[:print:]" (decode-char 'ucs #x5357) ;; kDefinition south; southern part; southward |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
969 ?\x0c) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
970 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
971 (Assert-char-class "[:graph:]" ?! ?\ ) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
972 (Assert-char-class "[:graph:]" ?0 ?\x09) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
973 (Assert-char-class "[:graph:]" ?9 ?\x7f) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
974 (Assert-char-class "[:graph:]" ?A ?\x01) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
975 (Assert-char-class "[:graph:]" ?Z ?\x02) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
976 (Assert-char-class "[:graph:]" ?B ?\t) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
977 (Assert-char-class "[:graph:]" ?a ?\x03) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
978 (Assert-char-class "[:graph:]" ?z ?\x04) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
979 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
980 "[:graph:]" (decode-char 'ucs #x0385) ;; GREEK DIALYTIKA TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
981 ?\x05) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
982 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
983 "[:graph:]" (decode-char 'ucs #x0392) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
984 ?\x06) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
985 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
986 "[:graph:]" (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
987 ?\x07) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
988 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
989 "[:graph:]" (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
990 ?\x08) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
991 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
992 "[:graph:]" (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
993 ?\x09) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
994 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
995 "[:graph:]" (decode-char 'ucs #x0686) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
996 ?\x0a) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
997 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
998 "[:graph:]" (decode-char 'ucs #x2116) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
999 ?\x0b) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1000 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1001 "[:graph:]" (decode-char 'ucs #x5357) ;; kDefinition south; southern part; southward |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1002 ?\x0c) |
5647
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1003 |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1004 (Assert-char-class "[:punct:]" ?\( ?0) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1005 (Assert-char-class "[:punct:]" ?. ?9) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1006 (Assert-char-class "[:punct:]" ?{ ?A) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1007 (Assert-char-class "[:punct:]" ?} ?Z) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1008 (Assert-char-class "[:punct:]" ?: ?\t) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1009 (Assert-char-class "[:punct:]" ?\; ?\x00) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1010 (Assert-char-class "[:punct:]" ?< ?\x09) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1011 (Assert-char-class "[:punct:]" ?> ?\x7f) |
1d9f603e9125
Turn on character classes in regex.c by default; test them in regexp-tests.el
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
1012 (Assert-char-class "[:punct:]" ?= ?a) |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1013 (Assert-char-class "[:punct:]" ?\? ?z) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1014 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1015 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1016 (decode-char 'ucs #x0385) ;; GREEK DIALYTIKA TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1017 ?a) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1018 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1019 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1020 (decode-char 'ucs #x20af) ;; DRACHMA SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1021 (decode-char 'ucs #x0392)) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1022 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1023 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1024 (decode-char 'ucs #x00a7) ;; SECTION SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1025 (decode-char 'ucs #x03B2)) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1026 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1027 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1028 (decode-char 'ucs #x00a8) ;; DIAERESIS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1029 (decode-char 'ucs #x0410)) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1030 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1031 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1032 (decode-char 'ucs #x0384) ;; GREEK TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1033 (decode-char 'ucs #x0430)) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1034 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1035 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1036 (decode-char 'ucs #x00b7) ;; MIDDLE DOT |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1037 (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1038 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1039 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1040 (decode-char 'ucs #x2116) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1041 ?x) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1042 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1043 "[:punct:]" |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1044 ?= |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1045 (decode-char 'ucs #x5357)) ;; kDefinition south; southern part; southward |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1046 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1047 (Assert-char-class "[:ascii:]" ?a (decode-char 'ucs #x00a7)) ;; SECTION SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1048 (Assert-char-class "[:ascii:]" ?b (decode-char 'ucs #x00a8)) ;; DIAERESIS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1049 (Assert-char-class "[:ascii:]" ?c (decode-char 'ucs #x00b7)) ;; MIDDLE DOT |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1050 (Assert-char-class "[:ascii:]" ?d (decode-char 'ucs #x0384)) ;; GREEK TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1051 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1052 "[:ascii:]" ?\x00 (decode-char 'ucs #x0392)) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1053 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1054 "[:ascii:]" ?\x01 (decode-char 'ucs #x03B2)) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1055 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1056 "[:ascii:]" ?\t (decode-char 'ucs #x0410)) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1057 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1058 "[:ascii:]" ?A (decode-char 'ucs #x0430)) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1059 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1060 "[:ascii:]" ?B (decode-char 'ucs #x0686)) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1061 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1062 "[:ascii:]" ?C (decode-char 'ucs #x20af)) ;; DRACHMA SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1063 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1064 "[:ascii:]" ?\x7f (decode-char 'ucs #x2116)) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1065 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1066 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1067 "[:nonascii:]" (decode-char 'ucs #x00a7) ?a) ;; SECTION SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1068 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1069 "[:nonascii:]" (decode-char 'ucs #x00a8) ?b) ;; DIAERESIS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1070 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1071 "[:nonascii:]" (decode-char 'ucs #x00b7) ?c) ;; MIDDLE DOT |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1072 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1073 "[:nonascii:]" (decode-char 'ucs #x0384) ?d) ;; GREEK TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1074 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1075 "[:nonascii:]" (decode-char 'ucs #x0392) ?\x00) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1076 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1077 "[:nonascii:]" (decode-char 'ucs #x03B2) ?\x01) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1078 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1079 "[:nonascii:]" (decode-char 'ucs #x0410) ?\t) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1080 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1081 "[:nonascii:]" (decode-char 'ucs #x0430) ?A) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1082 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1083 "[:nonascii:]" (decode-char 'ucs #x0686) ?B) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1084 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1085 "[:nonascii:]" (decode-char 'ucs #x20af) ?C) ;; DRACHMA SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1086 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1087 "[:nonascii:]" (decode-char 'ucs #x2116) ?\x7f) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1088 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1089 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1090 "[:multibyte:]" (decode-char 'ucs #x00a7) ?a) ;; SECTION SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1091 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1092 "[:multibyte:]" (decode-char 'ucs #x00a8) ?b) ;; DIAERESIS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1093 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1094 "[:multibyte:]" (decode-char 'ucs #x00b7) ?c) ;; MIDDLE DOT |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1095 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1096 "[:multibyte:]" (decode-char 'ucs #x0384) ?d) ;; GREEK TONOS |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1097 (Assert-char-class |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1098 "[:multibyte:]" (decode-char 'ucs #x0392) |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1099 ?\x00) ;; GREEK CAPITAL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1100 |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1101 (Assert-never-matching |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1102 "[:unibyte:]" |
5653
3df910176b6a
Support predefined character classes in #'skip-chars-{forward,backward}, too
Aidan Kehoe <kehoea@parhasard.net>
parents:
5649
diff
changeset
|
1103 ?\x80 ?\xe4 ?\xdf ?\xf8 |
5648
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1104 (decode-char 'ucs #x03B2) ;; GREEK SMALL LETTER BETA |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1105 (decode-char 'ucs #x0410) ;; CYRILLIC CAPITAL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1106 (decode-char 'ucs #x0430) ;; CYRILLIC SMALL LETTER A |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1107 (decode-char 'ucs #x0686) ;; ARABIC LETTER TCHEH |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1108 (decode-char 'ucs #x20af) ;; DRACHMA SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1109 (decode-char 'ucs #x2116) ;; NUMERO SIGN |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1110 (decode-char 'ucs #x5357))) ;; kDefinition south; southern part; southward |
3f4a234f4672
Support non-ASCII correctly in character classes, test this.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5647
diff
changeset
|
1111 |
5680
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1112 (with-temp-buffer |
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1113 (insert "hi there") |
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1114 (goto-char 1) |
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1115 (set-syntax-table (copy-syntax-table)) |
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1116 (modify-syntax-entry 'ascii "<") |
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1117 (Assert (null (re-search-forward "[[:alnum:]]" nil t)) |
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1118 "checking that a bug with dirty syntax table caches has been fixed")) |
8a2ac78cb97d
Pre-emptively update any dirty mirror syntax table before searching
Aidan Kehoe <kehoea@parhasard.net>
parents:
5653
diff
changeset
|
1119 |