diff tests/automated/mule-tests.el @ 4583:2669b1b7e33b

Correct little-endian UTF-16 surrogate handling. src/ChangeLog addition: 2009-01-31 Aidan Kehoe <kehoea@parhasard.net> * unicode.c (unicode_convert): Correct little-endian UTF-16 surrogate handling. tests/ChangeLog addition: 2009-01-31 Aidan Kehoe <kehoea@parhasard.net> * automated/mule-tests.el: Test little-endian Unicode surrogates too.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 31 Jan 2009 13:06:37 +0000
parents c95c06ee1e9d
children 4dc42d1fe684
line wrap: on
line diff
--- a/tests/automated/mule-tests.el	Sun Jan 18 12:56:51 2009 +0000
+++ b/tests/automated/mule-tests.el	Sat Jan 31 13:06:37 2009 +0000
@@ -446,12 +446,17 @@
 		       (encode-coding-string xemacs-character 'ctext))))))
 
   (loop
-    for (code-point encoded) 
-    in '((#x10000 "\xd8\x00\xdc\x00")
-         (#x10FFFD "\xdb\xff\xdf\xfd"))
-    do (Assert (equal (encode-coding-string 
-                       (decode-char 'ucs code-point) 'utf-16)
-                      encoded)))
+    for (code-point utf-16-big-endian utf-16-little-endian) 
+    in '((#x10000 "\xd8\x00\xdc\x00" "\x00\xd8\x00\xdc")
+         (#x10FFFD "\xdb\xff\xdf\xfd" "\xff\xdb\xfd\xdf"))
+    do
+    (Assert (equal (encode-coding-string 
+                    (decode-char 'ucs code-point) 'utf-16)
+                   utf-16-big-endian))
+    (Assert (equal (encode-coding-string 
+                    (decode-char 'ucs code-point) 'utf-16-le)
+                   utf-16-little-endian))
+
          
   ;;---------------------------------------------------------------
   ;; Regression test for a couple of CCL-related bugs.