diff tests/automated/mule-tests.el @ 3952:3584cb2c07db

[xemacs-hg @ 2007-05-13 11:11:28 by aidan] Support non-BMP UTF-16.
author aidan
date Sun, 13 May 2007 11:11:38 +0000
parents adecfd791c9b
children 949ac151a10d
line wrap: on
line diff
--- a/tests/automated/mule-tests.el	Sat May 12 21:51:25 2007 +0000
+++ b/tests/automated/mule-tests.el	Sun May 13 11:11:38 2007 +0000
@@ -341,9 +341,9 @@
 	      'utf-8
 	    'iso-8859-2))
 	 )
-    ;; This is how you suppress output from `message', called by `write-region'
     (Assert (not (equal name1 name2)))
     (Assert (not (file-exists-p name1)))
+    ;; This is how you suppress output from `message', called by `write-region'
     (Silence-Message
      (write-region (point-min) (point-max) name1))
     (Assert (file-exists-p name1))
@@ -401,6 +401,14 @@
 	(Assert (equal (concat "\033%G" utf-8-char)
 		       (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)))
+         
   ;;---------------------------------------------------------------
   ;; Regression test for a couple of CCL-related bugs. 
   ;;---------------------------------------------------------------