This patch fixes the 'make check' failure that occurs on non-mule UNIX builds,
most recently reported by Vin, and is based on Ben's observations.
The major change is that instead of disabling the test, I turn EOL detection
on for the life of the test. The reason is that the detection code is still
present in these builds and a user could enable it, so it might as well be
tested.
Looking through my notes I've discovered that this patch is remarkably similar
to a test patch on the subject that I produced a couple of years ago (see
http://list-archive.xemacs.org/xemacs-beta/200404/msg00397.html). It's nice
to see that my suspicions have been confirmed.
lisp/ChangeLog addition:
2005-12-10 Malcolm Purvis <malcolmp(a)xemacs.org>
* code-init.el (set-eol-detection): Add
`default-buffer-file-coding-system' to the list of coding systems
that are set.
src/ChangeLog addition:
2005-12-10 Malcolm Purvis <malcolmp(a)xemacs.org>
* tests.c (Ftest_data_format_conversion): Force EOL detection to
on during the life of a test that needs it.
xemacs-make-check source patch:
Diff command: cvs -q diff -u
Files affected: src/tests.c lisp/code-init.el
Index: lisp/code-init.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/code-init.el,v
retrieving revision 1.10
diff -u -r1.10 code-init.el
--- lisp/code-init.el 2005/01/26 09:51:23 1.10
+++ lisp/code-init.el 2005/12/10 12:24:23
@@ -60,7 +60,7 @@
default, but this may change. NOTE: You *REALLY* should not turn off EOL
detection on Windows! Your files will have lots of annoying ^M's in them
if you do this."
- (dolist (x '(buffer-file-coding-system-for-read
+ (dolist (x '(buffer-file-coding-system-for-read default-buffer-file-coding-system
keyboard
default-process-coding-system-read
no-conversion-coding-system-mapping))
Index: src/tests.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/tests.c,v
retrieving revision 1.11
diff -u -r1.11 tests.c
--- src/tests.c 2005/04/08 23:11:33 1.11
+++ src/tests.c 2005/12/10 12:24:28
@@ -35,7 +35,6 @@
static Lisp_Object Vtest_function_list;
-
DEFUN ("test-data-format-conversion", Ftest_data_format_conversion, 0, 0,
"", /*
Test TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT()
*/
@@ -357,12 +356,30 @@
intern ("no-conversion-unix"));
DFC_CHECK_DATA_COND_EOL_NUL (ptr, len, ext_unix, int_foo);
- TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_dos,
- LISP_BUFFER, Fcurrent_buffer(),
- intern ("undecided"));
- /* &&#### needs some 8-bit work here */
- DFC_CHECK_DATA (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)),
- sizeof (int_foo) - 1, int_foo);
+ {
+ /*
+ This test requires EOL detection to be enabled, which isn't by default
+ in all circumstances (in particular non-Mule on UNIX). Work around that
+ by enabling EOL detection for this test only.
+ */
+ Lisp_Object eol_detection_enabled_p = intern("eol-detection-enabled-p");
+ Lisp_Object set_eol_detection = intern("set-eol-detection");
+
+ Lisp_Object old_eol = Fsymbol_value(eol_detection_enabled_p);
+
+ Fset(eol_detection_enabled_p, Qt);
+ call1(set_eol_detection, Qt);
+
+ TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_dos,
+ LISP_BUFFER, Fcurrent_buffer(),
+ intern ("undecided"));
+ /* &&#### needs some 8-bit work here */
+ DFC_CHECK_DATA (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)),
+ sizeof (int_foo) - 1, int_foo);
+
+ Fset(eol_detection_enabled_p, old_eol);
+ call1(set_eol_detection, old_eol);
+ }
TO_INTERNAL_FORMAT (DATA, (ext_mac, sizeof (ext_mac) - 1),
LISP_STRING, string,
--
Malcolm Purvis <malcolmp(a)xemacs.org>