Mercurial > hg > xemacs-beta
comparison src/tests.c @ 4318:4d0f773d5e21
Fix the test failures introduced by the non-ISO-2022 coding systems.
APPROVE COMMIT
NOTE: this patch has been committed.
This is patch http://mid.gmane.org/18264.25814.828088.486899@parhasard.net
tests/ChangeLog addition:
2007-12-06 Aidan Kehoe <kehoea@parhasard.net>
* automated/mule-tests.el:
Add a Known-Bug-Expect-Error call testing and documenting that we
don't support all of the Unicode code space in a single session.
* automated/test-harness.el (Known-Bug-Expect-Error):
Provide Known-Bug-Expect-Error, analagous to
Known-Bug-Expect-Failure and Check-Error.
* automated/test-harness.el (Silence-Message):
Dynamically bind the function definition of #'clear-message, as
well as that of #'append-message, to nil.
src/ChangeLog addition:
2007-12-06 Aidan Kehoe <kehoea@parhasard.net>
* tests.c (Ftest_data_format_conversion):
Move those tests that expect that iso-8859-2 is ISO
2022-compatible to testing iso-latin-2-with-esc instead.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Dec 2007 15:10:46 +0100 |
parents | abdb33cc1f52 |
children | 294a86d29f99 |
comparison
equal
deleted
inserted
replaced
4317:15d36164ebd7 | 4318:4d0f773d5e21 |
---|---|
34 #include "elhash.h" | 34 #include "elhash.h" |
35 #include "opaque.h" | 35 #include "opaque.h" |
36 #include "file-coding.h" /* XCODING_SYSTEM_EOL_TYPE and its values */ | 36 #include "file-coding.h" /* XCODING_SYSTEM_EOL_TYPE and its values */ |
37 | 37 |
38 static Lisp_Object Vtest_function_list; | 38 static Lisp_Object Vtest_function_list; |
39 | |
40 | 39 |
41 DEFUN ("test-data-format-conversion", Ftest_data_format_conversion, 0, 0, "", /* | 40 DEFUN ("test-data-format-conversion", Ftest_data_format_conversion, 0, 0, "", /* |
42 Test TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT() | 41 Test TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT() |
43 */ | 42 */ |
44 ()) | 43 ()) |
68 int autodetect_eol_p = | 67 int autodetect_eol_p = |
69 !NILP (Fsymbol_value (intern ("eol-detection-enabled-p"))); | 68 !NILP (Fsymbol_value (intern ("eol-detection-enabled-p"))); |
70 | 69 |
71 /* Check for expected strings before and after conversion. | 70 /* Check for expected strings before and after conversion. |
72 Conversions depend on whether MULE is defined. */ | 71 Conversions depend on whether MULE is defined. */ |
72 | |
73 /* #### Any code below that uses iso-latin-2-with-esc is ill-conceived. */ | |
74 | |
73 #ifdef MULE | 75 #ifdef MULE |
74 #define DFC_CHECK_DATA_COND_MULE(ptr,len, \ | 76 #define DFC_CHECK_DATA_COND_MULE(ptr,len, \ |
75 constant_string_mule, \ | 77 constant_string_mule, \ |
76 constant_string_non_mule) \ | 78 constant_string_non_mule) \ |
77 DFC_CHECK_DATA (ptr, len, constant_string_mule) | 79 DFC_CHECK_DATA (ptr, len, constant_string_mule) |
135 DFC_CHECK_DATA (ptr, len, ext_latin); | 137 DFC_CHECK_DATA (ptr, len, ext_latin); |
136 | 138 |
137 ptr = NULL, len = rand(); | 139 ptr = NULL, len = rand(); |
138 TO_EXTERNAL_FORMAT (LISP_STRING, string_latin1, | 140 TO_EXTERNAL_FORMAT (LISP_STRING, string_latin1, |
139 ALLOCA, (ptr, len), | 141 ALLOCA, (ptr, len), |
140 intern ("iso-8859-2")); | 142 intern ("iso-latin-2-with-esc")); |
141 DFC_CHECK_DATA (ptr, len, ext_latin12); | 143 DFC_CHECK_DATA (ptr, len, ext_latin12); |
142 | 144 |
143 ptr = NULL, len = rand(); | 145 ptr = NULL, len = rand(); |
144 TO_EXTERNAL_FORMAT (DATA, (int_latin2, sizeof (int_latin2) - 1), | 146 TO_EXTERNAL_FORMAT (DATA, (int_latin2, sizeof (int_latin2) - 1), |
145 MALLOC, (ptr, len), | 147 MALLOC, (ptr, len), |
153 DFC_CHECK_DATA (XOPAQUE_DATA (opaque), XOPAQUE_SIZE (opaque), ext_latin); | 155 DFC_CHECK_DATA (XOPAQUE_DATA (opaque), XOPAQUE_SIZE (opaque), ext_latin); |
154 | 156 |
155 ptr = NULL, len = rand(); | 157 ptr = NULL, len = rand(); |
156 TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), | 158 TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), |
157 ALLOCA, (ptr, len), | 159 ALLOCA, (ptr, len), |
158 intern ("iso-8859-2")); | 160 intern ("iso-latin-2-with-esc")); |
159 DFC_CHECK_DATA (ptr, len, int_latin2); | 161 DFC_CHECK_DATA (ptr, len, int_latin2); |
160 | 162 |
161 ptr = NULL, len = rand(); | 163 ptr = NULL, len = rand(); |
162 TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), | 164 TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), |
163 MALLOC, (ptr, len), | 165 MALLOC, (ptr, len), |
164 intern ("iso-8859-2")); | 166 intern ("iso-latin-2-with-esc")); |
165 DFC_CHECK_DATA (ptr, len, int_latin2); | 167 DFC_CHECK_DATA (ptr, len, int_latin2); |
166 xfree (ptr, void *); | 168 xfree (ptr, void *); |
167 | 169 |
168 TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), | 170 TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), |
169 LISP_STRING, string, | 171 LISP_STRING, string, |
170 intern ("iso-8859-2")); | 172 intern ("iso-latin-2-with-esc")); |
171 DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); | 173 DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); |
172 | 174 |
173 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin, | 175 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin, |
174 LISP_STRING, string, | 176 LISP_STRING, string, |
175 intern ("iso-8859-2")); | 177 intern ("iso-latin-2-with-esc")); |
176 DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); | 178 DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); |
177 | 179 |
178 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin, | 180 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin, |
179 LISP_STRING, string, | 181 LISP_STRING, string, |
180 intern ("iso-8859-2")); | 182 intern ("iso-latin-2-with-esc")); |
181 DFC_CHECK_DATA_NUL (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); | 183 DFC_CHECK_DATA_NUL (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); |
182 | 184 |
183 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin, | 185 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin, |
184 LISP_BUFFER, Fcurrent_buffer(), | 186 LISP_BUFFER, Fcurrent_buffer(), |
185 intern ("iso-8859-2")); | 187 intern ("iso-latin-2-with-esc")); |
186 DFC_CHECK_DATA_NUL (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)), | 188 DFC_CHECK_DATA_NUL (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)), |
187 sizeof (int_latin2), int_latin2); | 189 sizeof (int_latin2), int_latin2); |
188 | 190 |
189 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin, | 191 TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin, |
190 LISP_BUFFER, Fcurrent_buffer(), | 192 LISP_BUFFER, Fcurrent_buffer(), |
192 DFC_CHECK_DATA (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)), | 194 DFC_CHECK_DATA (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)), |
193 sizeof (int_latin1) - 1, int_latin1); | 195 sizeof (int_latin1) - 1, int_latin1); |
194 | 196 |
195 TO_INTERNAL_FORMAT (DATA, (ext_latin12, sizeof (ext_latin12) - 1), | 197 TO_INTERNAL_FORMAT (DATA, (ext_latin12, sizeof (ext_latin12) - 1), |
196 ALLOCA, (ptr, len), | 198 ALLOCA, (ptr, len), |
197 intern ("iso-8859-2")); | 199 intern ("iso-latin-2-with-esc")); |
198 DFC_CHECK_DATA (ptr, len, int_latin1); | 200 DFC_CHECK_DATA (ptr, len, int_latin1); |
199 | 201 |
200 #endif /* MULE */ | 202 #endif /* MULE */ |
201 | 203 |
202 ptr = NULL, len = rand(); | 204 ptr = NULL, len = rand(); |