annotate tests/automated/mule-tests.el @ 3701:58f19b254a23

[xemacs-hg @ 2006-11-25 22:06:29 by aidan] Move the ISO-IR 196 test, which may crash, to a separate file.
author aidan
date Sat, 25 Nov 2006 22:06:34 +0000
parents 42e4605ef1de
children cd487eafbc76
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;; Copyright (C) 1999 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Author: Hrvoje Niksic <hniksic@xemacs.org>
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
4 ;; Maintainers: Hrvoje Niksic <hniksic@xemacs.org>,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
5 ;; Martin Buchholz <martin@xemacs.org>
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Created: 1999
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 ;; Keywords: tests
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ;;; Synched up with: Not in FSF.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 ;; Test some Mule functionality (most of these remain to be written) .
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;; See test-harness.el for instructions on how to run these tests.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
33 ;; This file will be (read)ed by a non-mule XEmacs, so don't use
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
34 ;; literal non-Latin1 characters. Use (make-char) instead.
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
35
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 ;;-----------------------------------------------------------------
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 ;; Test whether all legal chars may be safely inserted to a buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 ;;-----------------------------------------------------------------
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 (defun test-chars (&optional for-test-harness)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 "Insert all characters in a buffer, to see if XEmacs will crash.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 This is done by creating a string with all the legal characters
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 in [0, 2^19) range, inserting it into the buffer, and checking
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 that the buffer's contents are equivalent to the string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 If FOR-TEST-HARNESS is specified, a temporary buffer is used, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 the Assert macro checks for correctness."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 (let ((max (expt 2 (if (featurep 'mule) 19 8)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 (list nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (i 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (while (< i max)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 (and (not for-test-harness)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 (zerop (% i 1000))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 (message "%d" i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 (and (int-char i)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 ;; Don't aset to a string directly because random string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 ;; access is O(n) under Mule.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 (setq list (cons (int-char i) list)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 (setq i (1+ i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 (let ((string (apply #'string (nreverse list))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 (if for-test-harness
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 ;; For use with test-harness, use Assert and a temporary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 ;; buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 (with-temp-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (insert string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 (Assert (equal (buffer-string) string)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 ;; For use without test harness: use a normal buffer, so that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 ;; you can also test whether redisplay works.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 (switch-to-buffer (get-buffer-create "test"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 (erase-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 (buffer-disable-undo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (insert string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (assert (equal (buffer-string) string))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 ;; It would be really *really* nice if test-harness allowed a way to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 ;; run a test in byte-compiled mode only. It's tedious to have
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 ;; time-consuming tests like this one run twice, once interpreted and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 ;; once compiled, for no good reason.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 (test-chars t)
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
80
3439
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
81 (defun unicode-code-point-to-utf-8-string (code-point)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
82 "Convert a Unicode code point to the equivalent UTF-8 string.
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
83 This is a naive implementation in Lisp. "
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
84 (check-argument-type 'natnump code-point)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
85 (check-argument-range code-point 0 #x1fffff)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
86 (if (< code-point #x80)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
87 (format "%c" code-point)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
88 (if (< code-point #x800)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
89 (format "%c%c"
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
90 ;; ochars[0] = 0xC0 | (input & ~(0xFFFFF83F)) >> 6;
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
91 (logior #xc0 (lsh (logand code-point #x7c0) -6))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
92 ;; ochars[1] = 0x80 | input & ~(0xFFFFFFC0);
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
93 (logior #x80 (logand code-point #x3f)))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
94 (if (< code-point #x00010000)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
95 (format "%c%c%c"
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
96 ;; ochars[0] = 0xE0 | (input >> 12) & ~(0xFFFFFFF0);
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
97 (logior #xe0 (logand (lsh code-point -12) #x0f))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
98 ;; ochars[1] = 0x80 | (input >> 6) & ~(0xFFFFFFC0);
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
99 (logior #x80 (logand (lsh code-point -6) #x3f))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
100 ;; ochars[2] = 0x80 | input & ~(0xFFFFFFC0);
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
101 (logior #x80 (logand code-point #x3f)))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
102 (if (< code-point #x200000)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
103 (format "%c%c%c%c"
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
104 ;; ochars[0] = 0xF0 | (input >> 18) & ~(0xFFFFFFF8)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
105 (logior #xF0 (logand (lsh code-point -18) #x7))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
106 ;; ochars[1] = 0x80 | (input >> 12) & ~(0xFFFFFFC0);
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
107 (logior #x80 (logand (lsh code-point -12) #x3f))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
108 ;; ochars[2] = 0x80 | (input >> 6) & ~(0xFFFFFFC0);
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
109 (logior #x80 (logand (lsh code-point -6) #x3f))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
110 ;; ochars[3] = 0x80 | input & ~(0xFFFFFFC0);
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
111 (logior #x80 (logand code-point #x3f))))))))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
112
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
113 ;;-----------------------------------------------------------------
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
114 ;; Test string modification functions that modify the length of a char.
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
115 ;;-----------------------------------------------------------------
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
116
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
117 (when (featurep 'mule)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
118 ;;---------------------------------------------------------------
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
119 ;; Test fillarray
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
120 ;;---------------------------------------------------------------
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
121 (macrolet
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
122 ((fillarray-test
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
123 (charset1 charset2)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
124 (let ((char1 (make-char charset1 69))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
125 (char2 (make-char charset2 69)))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
126 `(let ((string (make-string 1000 ,char1)))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
127 (fillarray string ,char2)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
128 (Assert (eq (aref string 0) ,char2))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
129 (Assert (eq (aref string (1- (length string))) ,char2))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
130 (Assert (eq (length string) 1000))))))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
131 (fillarray-test ascii latin-iso8859-1)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
132 (fillarray-test ascii latin-iso8859-2)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
133 (fillarray-test latin-iso8859-1 ascii)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
134 (fillarray-test latin-iso8859-2 ascii))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
135
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
136 ;; Test aset
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
137 (let ((string (string (make-char 'ascii 69) (make-char 'latin-iso8859-2 69))))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
138 (aset string 0 (make-char 'latin-iso8859-2 42))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
139 (Assert (eq (aref string 1) (make-char 'latin-iso8859-2 69))))
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
140
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
141 ;;---------------------------------------------------------------
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
142 ;; Test coding system functions
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
143 ;;---------------------------------------------------------------
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
144
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
145 ;; Create alias for coding system without subsidiaries
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
146 (Assert (coding-system-p (find-coding-system 'binary)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
147 (Assert (coding-system-canonical-name-p 'binary))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
148 (Assert (not (coding-system-alias-p 'binary)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
149 (Assert (not (coding-system-alias-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
150 (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
151 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
152 error "Symbol is the canonical name of a coding system and cannot be redefined"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
153 (define-coding-system-alias 'binary 'iso8859-2))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
154 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
155 error "Symbol is not a coding system alias"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
156 (coding-system-aliasee 'binary))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
157
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
158 (define-coding-system-alias 'mule-tests-alias 'binary)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
159 (Assert (coding-system-alias-p 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
160 (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
161 (Assert (eq (get-coding-system 'binary) (get-coding-system 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
162 (Assert (eq 'binary (coding-system-aliasee 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
163 (Assert (not (coding-system-alias-p 'mule-tests-alias-unix)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
164 (Assert (not (coding-system-alias-p 'mule-tests-alias-dos)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
165 (Assert (not (coding-system-alias-p 'mule-tests-alias-mac)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
166
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
167 (define-coding-system-alias 'mule-tests-alias (get-coding-system 'binary))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
168 (Assert (coding-system-alias-p 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
169 (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
170 (Assert (eq (get-coding-system 'binary) (get-coding-system 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
171 (Assert (eq 'binary (coding-system-aliasee 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
172 (Assert (not (coding-system-alias-p 'mule-tests-alias-unix)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
173 (Assert (not (coding-system-alias-p 'mule-tests-alias-dos)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
174 (Assert (not (coding-system-alias-p 'mule-tests-alias-mac)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
175
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
176 (define-coding-system-alias 'nested-mule-tests-alias 'mule-tests-alias)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
177 (Assert (coding-system-alias-p 'nested-mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
178 (Assert (not (coding-system-canonical-name-p 'nested-mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
179 (Assert (eq (get-coding-system 'binary) (get-coding-system 'nested-mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
180 (Assert (eq (coding-system-aliasee 'nested-mule-tests-alias) 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
181 (Assert (eq 'mule-tests-alias (coding-system-aliasee 'nested-mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
182 (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-unix)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
183 (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-dos)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
184 (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-mac)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
185
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
186 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
187 error "Attempt to create a coding system alias loop"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
188 (define-coding-system-alias 'mule-tests-alias 'nested-mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
189 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
190 error "No such coding system"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
191 (define-coding-system-alias 'no-such-coding-system 'no-such-coding-system))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
192 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
193 error "Attempt to create a coding system alias loop"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
194 (define-coding-system-alias 'mule-tests-alias 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
195
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
196 (define-coding-system-alias 'nested-mule-tests-alias nil)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
197 (define-coding-system-alias 'mule-tests-alias nil)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
198 (Assert (coding-system-p (find-coding-system 'binary)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
199 (Assert (coding-system-canonical-name-p 'binary))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
200 (Assert (not (coding-system-alias-p 'binary)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
201 (Assert (not (coding-system-alias-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
202 (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
203 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
204 error "Symbol is the canonical name of a coding system and cannot be redefined"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
205 (define-coding-system-alias 'binary 'iso8859-2))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
206 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
207 error "Symbol is not a coding system alias"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
208 (coding-system-aliasee 'binary))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
209
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
210 (define-coding-system-alias 'nested-mule-tests-alias nil)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
211 (define-coding-system-alias 'mule-tests-alias nil)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
212
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
213 ;; Create alias for coding system with subsidiaries
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
214 (define-coding-system-alias 'mule-tests-alias 'iso-8859-7)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
215 (Assert (coding-system-alias-p 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
216 (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
217 (Assert (eq (get-coding-system 'iso-8859-7) (get-coding-system 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
218 (Assert (eq 'iso-8859-7 (coding-system-aliasee 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
219 (Assert (coding-system-alias-p 'mule-tests-alias-unix))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
220 (Assert (coding-system-alias-p 'mule-tests-alias-dos))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
221 (Assert (coding-system-alias-p 'mule-tests-alias-mac))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
222
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
223 (define-coding-system-alias 'mule-tests-alias (get-coding-system 'iso-8859-7))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
224 (Assert (coding-system-alias-p 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
225 (Assert (not (coding-system-canonical-name-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
226 (Assert (eq (get-coding-system 'iso-8859-7) (get-coding-system 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
227 (Assert (eq 'iso-8859-7 (coding-system-aliasee 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
228 (Assert (coding-system-alias-p 'mule-tests-alias-unix))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
229 (Assert (coding-system-alias-p 'mule-tests-alias-dos))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
230 (Assert (coding-system-alias-p 'mule-tests-alias-mac))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
231 (Assert (eq (find-coding-system 'mule-tests-alias-mac)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
232 (find-coding-system 'iso-8859-7-mac)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
233
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
234 (define-coding-system-alias 'nested-mule-tests-alias 'mule-tests-alias)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
235 (Assert (coding-system-alias-p 'nested-mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
236 (Assert (not (coding-system-canonical-name-p 'nested-mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
237 (Assert (eq (get-coding-system 'iso-8859-7)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
238 (get-coding-system 'nested-mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
239 (Assert (eq (coding-system-aliasee 'nested-mule-tests-alias) 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
240 (Assert (eq 'mule-tests-alias (coding-system-aliasee 'nested-mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
241 (Assert (coding-system-alias-p 'nested-mule-tests-alias-unix))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
242 (Assert (coding-system-alias-p 'nested-mule-tests-alias-dos))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
243 (Assert (coding-system-alias-p 'nested-mule-tests-alias-mac))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
244 (Assert (eq (find-coding-system 'nested-mule-tests-alias-unix)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
245 (find-coding-system 'iso-8859-7-unix)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
246
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
247 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
248 error "Attempt to create a coding system alias loop"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
249 (define-coding-system-alias 'mule-tests-alias 'nested-mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
250 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
251 error "No such coding system"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
252 (define-coding-system-alias 'no-such-coding-system 'no-such-coding-system))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
253 (Check-Error-Message
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
254 error "Attempt to create a coding system alias loop"
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
255 (define-coding-system-alias 'mule-tests-alias 'mule-tests-alias))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
256
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
257 ;; Test dangling alias deletion
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
258 (define-coding-system-alias 'mule-tests-alias nil)
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
259 (Assert (not (coding-system-alias-p 'mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
260 (Assert (not (coding-system-alias-p 'mule-tests-alias-unix)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
261 (Assert (not (coding-system-alias-p 'nested-mule-tests-alias)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
262 (Assert (not (coding-system-alias-p 'nested-mule-tests-alias-dos)))
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
263
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
264 ;;---------------------------------------------------------------
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
265 ;; Test strings waxing and waning across the 8k BIG_STRING limit (see alloc.c)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
266 ;;---------------------------------------------------------------
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
267 (defun charset-char-string (charset)
2026
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
268 (let (lo hi string n (gc-cons-threshold most-positive-fixnum))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
269 (if (= (charset-chars charset) 94)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
270 (setq lo 33 hi 126)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
271 (setq lo 32 hi 127))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
272 (if (= (charset-dimension charset) 1)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
273 (progn
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
274 (setq string (make-string (1+ (- hi lo)) ??))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
275 (setq n 0)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
276 (loop for j from lo to hi do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
277 (progn
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
278 (aset string n (make-char charset j))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
279 (incf n)))
2026
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
280 (garbage-collect)
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
281 string)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
282 (progn
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
283 (setq string (make-string (* (1+ (- hi lo)) (1+ (- hi lo))) ??))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
284 (setq n 0)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
285 (loop for j from lo to hi do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
286 (loop for k from lo to hi do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
287 (progn
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
288 (aset string n (make-char charset j k))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
289 (incf n))))
2026
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
290 (garbage-collect)
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
291 string))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
292
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
293 ;; The following two used to crash xemacs!
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
294 (Assert (charset-char-string 'japanese-jisx0208))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
295 (aset (make-string 9003 ??) 1 (make-char 'latin-iso8859-1 77))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
296
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
297 (let ((greek-string (charset-char-string 'greek-iso8859-7))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
298 (string (make-string (* 96 60) ??)))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
299 (loop for j from 0 below (length string) do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
300 (aset string j (aref greek-string (mod j 96))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
301 (loop for k in '(0 1 58 59) do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
302 (Assert (equal (substring string (* 96 k) (* 96 (1+ k))) greek-string))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
303
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
304 (let ((greek-string (charset-char-string 'greek-iso8859-7))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
305 (string (make-string (* 96 60) ??)))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
306 (loop for j from (1- (length string)) downto 0 do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
307 (aset string j (aref greek-string (mod j 96))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
308 (loop for k in '(0 1 58 59) do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
309 (Assert (equal (substring string (* 96 k) (* 96 (1+ k))) greek-string))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
310
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
311 (let ((ascii-string (charset-char-string 'ascii))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
312 (string (make-string (* 94 60) (make-char 'greek-iso8859-7 57))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
313 (loop for j from 0 below (length string) do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
314 (aset string j (aref ascii-string (mod j 94))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
315 (loop for k in '(0 1 58 59) do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
316 (Assert (equal (substring string (* 94 k) (+ 94 (* 94 k))) ascii-string))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
317
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
318 (let ((ascii-string (charset-char-string 'ascii))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
319 (string (make-string (* 94 60) (make-char 'greek-iso8859-7 57))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
320 (loop for j from (1- (length string)) downto 0 do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
321 (aset string j (aref ascii-string (mod j 94))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
322 (loop for k in '(0 1 58 59) do
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
323 (Assert (equal (substring string (* 94 k) (* 94 (1+ k))) ascii-string))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
324
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
325 ;;---------------------------------------------------------------
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
326 ;; Test file-system character conversion (and, en passant, file ops)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
327 ;;---------------------------------------------------------------
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
328 (let* ((scaron (make-char 'latin-iso8859-2 57))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
329 (latin2-string (make-string 4 scaron))
597
ce085c4b3999 [xemacs-hg @ 2001-06-01 05:05:54 by martinb]
martinb
parents: 442
diff changeset
330 (prefix (concat (file-name-as-directory
ce085c4b3999 [xemacs-hg @ 2001-06-01 05:05:54 by martinb]
martinb
parents: 442
diff changeset
331 (file-truename (temp-directory)))
ce085c4b3999 [xemacs-hg @ 2001-06-01 05:05:54 by martinb]
martinb
parents: 442
diff changeset
332 latin2-string))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
333 (name1 (make-temp-name prefix))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
334 (name2 (make-temp-name prefix))
2026
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
335 (file-name-coding-system
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
336 ;; 'iso-8859-X doesn't work on darwin (as of "Panther" 10.3), it
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
337 ;; seems to know that file-name-coding-system is definitely utf-8
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
338 (if (string-match "darwin" system-configuration)
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
339 'utf-8
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
340 'iso-8859-2))
ca02e61c9829 [xemacs-hg @ 2004-04-19 06:22:32 by stephent]
stephent
parents: 1316
diff changeset
341 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
342 ;; This is how you suppress output from `message', called by `write-region'
3472
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
343 (Assert (not (equal name1 name2)))
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
344 (Assert (not (file-exists-p name1)))
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
345 (Silence-Message
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
346 (write-region (point-min) (point-max) name1))
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
347 (Assert (file-exists-p name1))
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
348 (when (fboundp 'make-symbolic-link)
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
349 (make-symbolic-link name1 name2)
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
350 (Assert (file-exists-p name2))
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
351 (Assert (equal (file-truename name2) name1))
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
352 (Assert (equal (file-truename name1) name1)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
353
3472
43b4a54fbf66 [xemacs-hg @ 2006-06-24 14:30:36 by stephent]
stephent
parents: 3439
diff changeset
354 (ignore-file-errors (delete-file name1) (delete-file name2)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
355
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
356 ;; Add many more file operation tests here...
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
357
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
358 ;;---------------------------------------------------------------
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
359 ;; Test Unicode-related functions
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
360 ;;---------------------------------------------------------------
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
361 (let* ((scaron (make-char 'latin-iso8859-2 57)))
875
708faa3b4cb1 [xemacs-hg @ 2002-06-23 06:53:46 by stephent]
stephent
parents: 800
diff changeset
362 ;; Used to try #x0000, but you can't change ASCII or Latin-1
708faa3b4cb1 [xemacs-hg @ 2002-06-23 06:53:46 by stephent]
stephent
parents: 800
diff changeset
363 (loop for code in '(#x0100 #x2222 #x4444 #xffff) do
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
364 (progn
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 597
diff changeset
365 (set-unicode-conversion scaron code)
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 597
diff changeset
366 (Assert (eq code (char-to-unicode scaron)))
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 597
diff changeset
367 (Assert (eq scaron (unicode-to-char code '(latin-iso8859-2))))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
368
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 597
diff changeset
369 (Check-Error wrong-type-argument (set-unicode-conversion scaron -10000)))
1195
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
370
3439
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
371 (dolist (utf-8-char
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
372 '("\xc6\x92" ;; U+0192 LATIN SMALL LETTER F WITH HOOK
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
373 "\xe2\x81\x8a" ;; U+204A TIRONIAN SIGN ET
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
374 "\xe2\x82\xae" ;; U+20AE TUGRIK SIGN
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
375 "\xf0\x9d\x92\xbd" ;; U+1D4BD MATHEMATICAL SCRIPT SMALL H
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
376 "\xf0\x9d\x96\x93" ;; U+1D593 MATHEMATICAL BOLD FRAKTUR SMALL N
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
377 "\xf0\xaf\xa8\x88" ;; U+2FA08 CJK COMPATIBILITY FOR U+4BCE
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
378 "\xf4\x8f\xbf\xbd")) ;; U+10FFFD <Plane 16 Private Use, Last>
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
379 (let* ((xemacs-character (car (append
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
380 (decode-coding-string utf-8-char 'utf-8)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
381 nil)))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
382 (xemacs-charset (car (split-char xemacs-character))))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
383
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
384 ;; Trivial test of the UTF-8 support of the escape-quoted character set.
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
385 (Assert (equal (decode-coding-string utf-8-char 'utf-8)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
386 (decode-coding-string (concat "\033%G" utf-8-char)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
387 'escape-quoted)))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
388
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
389 ;; Check that the reverse mapping holds.
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
390 (Assert (equal (unicode-code-point-to-utf-8-string
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
391 (encode-char xemacs-character 'ucs))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
392 utf-8-char))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
393
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
394 ;; Check that, if this character has been JIT-allocated, it is encoded
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
395 ;; in escape-quoted using the corresponding UTF-8 escape.
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
396 (when (charset-property xemacs-charset 'encode-as-utf-8)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
397 (Assert (equal (concat "\033%G" utf-8-char)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
398 (encode-coding-string xemacs-character 'escape-quoted)))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
399 (Assert (equal (concat "\033%G" utf-8-char)
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
400 (encode-coding-string xemacs-character 'ctext))))))
d1754e7f0cea [xemacs-hg @ 2006-06-03 17:50:39 by aidan]
aidan
parents: 2026
diff changeset
401
1195
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
402 ;;---------------------------------------------------------------
3690
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
403 ;; Regression test for a couple of CCL-related bugs.
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
404 ;;---------------------------------------------------------------
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
405
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
406 (let ((ccl-vector [0 0 0 0 0 0 0 0 0]))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
407 (define-ccl-program ccl-write-two-control-1-chars
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
408 `(1
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
409 ((r0 = ,(charset-id 'control-1))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
410 (r1 = 0)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
411 (write-multibyte-character r0 r1)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
412 (r1 = 31)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
413 (write-multibyte-character r0 r1)))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
414 "CCL program that writes two control-1 multibyte characters.")
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
415
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
416 (Assert (equal
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
417 (ccl-execute-on-string 'ccl-write-two-control-1-chars
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
418 ccl-vector "")
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
419 (format "%c%c" (make-char 'control-1 0)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
420 (make-char 'control-1 31))))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
421
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
422 (define-ccl-program ccl-unicode-two-control-1-chars
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
423 `(1
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
424 ((r0 = ,(charset-id 'control-1))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
425 (r1 = 31)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
426 (mule-to-unicode r0 r1)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
427 (r4 = r0)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
428 (r3 = ,(charset-id 'control-1))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
429 (r2 = 0)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
430 (mule-to-unicode r3 r2)))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
431 "CCL program that writes two control-1 UCS code points in r3 and r4")
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
432
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
433 ;; Re-initialise the vector, mainly to clear the instruction counter,
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
434 ;; which is its last element.
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
435 (setq ccl-vector [0 0 0 0 0 0 0 0 0])
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
436
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
437 (ccl-execute-on-string 'ccl-unicode-two-control-1-chars ccl-vector "")
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
438
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
439 (Assert (and (eq (aref ccl-vector 3)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
440 (encode-char (make-char 'control-1 0) 'ucs))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
441 (eq (aref ccl-vector 4)
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
442 (encode-char (make-char 'control-1 31) 'ucs)))))
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
443
d6a215ad08b8 [xemacs-hg @ 2006-11-20 19:21:47 by aidan]
aidan
parents: 3472
diff changeset
444 ;;---------------------------------------------------------------
1195
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
445 ;; Test charset-in-* functions
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
446 ;;---------------------------------------------------------------
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
447 (with-temp-buffer
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
448 (insert-file-contents (locate-data-file "HELLO"))
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
449 ;; #### rewrite robustly, both assume that the tested implementation
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
450 ;; uses the same algorithm as was used by the version current at time
dff007bd492b [xemacs-hg @ 2003-01-09 12:49:36 by stephent]
stephent
parents: 875
diff changeset
451 ;; this test was written
1316
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
452 (Assert (equal (charsets-in-region (point-min) (point-max))
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
453 '(korean-ksc5601 chinese-big5-1 chinese-gb2312
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
454 japanese-jisx0212 katakana-jisx0201 japanese-jisx0208
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
455 vietnamese-viscii-lower thai-xtis cyrillic-iso8859-5
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
456 hebrew-iso8859-8 greek-iso8859-7 latin-iso8859-1
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
457 latin-iso8859-2 arabic-2-column arabic-1-column
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
458 ethiopic ascii)))
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
459 (Assert (equal (charsets-in-string (buffer-substring (point-min)
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
460 (point-max)))
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
461 '(korean-ksc5601 chinese-big5-1 chinese-gb2312
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
462 japanese-jisx0212 katakana-jisx0201 japanese-jisx0208
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
463 vietnamese-viscii-lower thai-xtis cyrillic-iso8859-5
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
464 hebrew-iso8859-8 greek-iso8859-7 latin-iso8859-1
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
465 latin-iso8859-2 arabic-2-column arabic-1-column
59e2c5b1e38f [xemacs-hg @ 2003-02-20 15:39:38 by stephent]
stephent
parents: 1195
diff changeset
466 ethiopic ascii))))
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
467 )