diff tests/automated/mule-tests.el @ 1195:dff007bd492b

[xemacs-hg @ 2003-01-09 12:49:36 by stephent] unit test cases <873co2wkua.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Thu, 09 Jan 2003 12:49:43 +0000
parents 708faa3b4cb1
children 59e2c5b1e38f
line wrap: on
line diff
--- a/tests/automated/mule-tests.el	Wed Jan 08 22:52:54 2003 +0000
+++ b/tests/automated/mule-tests.el	Thu Jan 09 12:49:43 2003 +0000
@@ -327,4 +327,27 @@
 	(Assert (eq scaron (unicode-to-char code '(latin-iso8859-2))))))
   
     (Check-Error wrong-type-argument (set-unicode-conversion scaron -10000)))
+
+  ;;---------------------------------------------------------------
+  ;; Test charset-in-* functions
+  ;;---------------------------------------------------------------
+  (with-temp-buffer
+    (insert-file-contents (locate-data-file "HELLO"))
+    ;; #### rewrite robustly, both assume that the tested implementation
+    ;; uses the same algorithm as was used by the version current at time
+    ;; this test was written
+    (Assert (eq (charsets-in-region (point-min) (point-max))
+		'(korean-ksc5601 chinese-big5-1 chinese-gb2312
+		  japanese-jisx0212 katakana-jisx0201 japanese-jisx0208
+		  vietnamese-viscii-lower thai-xtis cyrillic-iso8859-5
+		  hebrew-iso8859-8 greek-iso8859-7 latin-iso8859-1
+		  latin-iso8859-2 arabic-2-column arabic-1-column
+		  ethiopic ascii)))
+    (Assert (eq (charsets-in-string (buffer-substring (point-min) (point-max)))
+		'(korean-ksc5601 chinese-big5-1 chinese-gb2312
+		  japanese-jisx0212 katakana-jisx0201 japanese-jisx0208
+		  vietnamese-viscii-lower thai-xtis cyrillic-iso8859-5
+		  hebrew-iso8859-8 greek-iso8859-7 latin-iso8859-1
+		  latin-iso8859-2 arabic-2-column arabic-1-column
+		  ethiopic ascii))))
   )