changeset:   4318:4d0f773d5e211688cf56f51aaeea2054f3eb016d
tag:         tip
user:        Aidan Kehoe <kehoea(a)parhasard.net>
date:        Sun Dec 09 15:10:46 2007 +0100
files:       src/ChangeLog src/tests.c tests/ChangeLog tests/automated/mule-tests.el
description:
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(a)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(a)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.
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r
4d0f773d5e211688cf56f51aaeea2054f3eb016d src/ChangeLog
--- a/src/ChangeLog	Sun Dec 09 14:55:03 2007 +0100
+++ b/src/ChangeLog	Sun Dec 09 15:10:46 2007 +0100
@@ -1,3 +1,9 @@ 2007-12-02  Ron Isaacson  <ron.isaacson@
+2007-12-06  Aidan Kehoe  <kehoea(a)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.
+
 2007-12-02  Ron Isaacson  <ron.isaacson(a)morganstanley.com>
 
 	* frame.c (change_frame_size):
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r
4d0f773d5e211688cf56f51aaeea2054f3eb016d src/tests.c
--- a/src/tests.c	Sun Dec 09 14:55:03 2007 +0100
+++ b/src/tests.c	Sun Dec 09 15:10:46 2007 +0100
@@ -36,7 +36,6 @@ Boston, MA 02111-1307, USA.  */
 #include "file-coding.h"	/* XCODING_SYSTEM_EOL_TYPE and its values */
 
 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()
@@ -70,6 +69,9 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
 
   /* Check for expected strings before and after conversion.
      Conversions depend on whether MULE is defined. */
+
+  /* #### Any code below that uses iso-latin-2-with-esc is ill-conceived. */
+
 #ifdef MULE
 #define DFC_CHECK_DATA_COND_MULE(ptr,len,			\
 				 constant_string_mule,		\
@@ -137,7 +139,7 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
   ptr = NULL, len = rand();
   TO_EXTERNAL_FORMAT (LISP_STRING, string_latin1,
 		      ALLOCA, (ptr, len),
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA (ptr, len, ext_latin12);
 
   ptr = NULL, len = rand();
@@ -155,34 +157,34 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
   ptr = NULL, len = rand();
   TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
 		      ALLOCA, (ptr, len),
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA (ptr, len, int_latin2);
 
   ptr = NULL, len = rand();
   TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
 		      MALLOC, (ptr, len),
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA (ptr, len, int_latin2);
   xfree (ptr, void *);
 
   TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
 		      LISP_STRING, string,
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
 
   TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin,
 		      LISP_STRING, string,
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
 
   TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin,
 		      LISP_STRING, string,
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA_NUL (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
 
   TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin,
 		      LISP_BUFFER, Fcurrent_buffer(),
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA_NUL (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)),
 		    sizeof (int_latin2), int_latin2);
 
@@ -194,7 +196,7 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
 
   TO_INTERNAL_FORMAT (DATA, (ext_latin12, sizeof (ext_latin12) - 1),
 		      ALLOCA, (ptr, len),
-		      intern ("iso-8859-2"));
+		      intern ("iso-latin-2-with-esc"));
   DFC_CHECK_DATA (ptr, len, int_latin1);
 
 #endif /* MULE */
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r
4d0f773d5e211688cf56f51aaeea2054f3eb016d tests/ChangeLog
--- a/tests/ChangeLog	Sun Dec 09 14:55:03 2007 +0100
+++ b/tests/ChangeLog	Sun Dec 09 15:10:46 2007 +0100
@@ -1,3 +1,15 @@ 2007-12-04  Aidan Kehoe  <kehoea@parhasa
+2007-12-06  Aidan Kehoe  <kehoea(a)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.
+
 2007-12-04  Aidan Kehoe  <kehoea(a)parhasard.net>
 
 	* automated/mule-tests.el (featurep):
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r
4d0f773d5e211688cf56f51aaeea2054f3eb016d tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el	Sun Dec 09 14:55:03 2007 +0100
+++ b/tests/automated/mule-tests.el	Sun Dec 09 15:10:46 2007 +0100
@@ -721,4 +721,17 @@ This is a naive implementation in Lisp. 
       (Known-Bug-Expect-Failure
        (Assert-elc-is-escape-quoted))
       (delete-region (point-min) (point-max))))
+
+  (Known-Bug-Expect-Error
+   invalid-constant
+   (loop
+     for i from #x0 to #x10FFFF 
+     with exceptions = #s(range-table type start-closed-end-closed
+                                      data ((#xFFFE #xFFFF) t
+                                            (#xFDD0 #xFDEF) t
+                                            (#xD800 #xDBFF) t
+                                            (#xDC00 #xDFFF) t))
+     do (unless (get-range-table i exceptions)
+          (read (format (if (> i #xFFFF) #r"?\U%08X" #r"?\u%04X")
i)))
+     finally return t))
   )
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches