changeset 3927:cd487eafbc76

[xemacs-hg @ 2007-04-29 13:19:55 by aidan] Make the charsets-in-region algorithm irrelevant, mule-tests.el.
author aidan
date Sun, 29 Apr 2007 13:20:00 +0000
parents 74b10360eef9
children ab912e9a7ace
files tests/ChangeLog tests/automated/mule-tests.el
diffstat 2 files changed, 26 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/tests/ChangeLog	Sun Apr 29 11:15:04 2007 +0000
+++ b/tests/ChangeLog	Sun Apr 29 13:20:00 2007 +0000
@@ -1,3 +1,11 @@
+2007-04-29  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/mule-tests.el (featurep):
+	Sort the results of charsets-in-region, charsets-in-string before
+	comparing them to the previously-determined list of character
+	sets. Eliminates a dependency on the algorithm
+	charsets-in-{region,string} uses. 
+
 2007-03-26  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* automated/syntax-tests.el: Test for regression of bug fixed by
--- a/tests/automated/mule-tests.el	Sun Apr 29 11:15:04 2007 +0000
+++ b/tests/automated/mule-tests.el	Sun Apr 29 13:20:00 2007 +0000
@@ -446,22 +446,23 @@
   ;;---------------------------------------------------------------
   (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 (equal (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 (equal (charsets-in-string (buffer-substring (point-min)
+    (Assert (equal 
+             ;; The sort is to make the algorithm of charsets-in-region
+             ;; irrelevant.
+             (sort (charsets-in-region (point-min) (point-max))
+                   'string<)
+             '(arabic-1-column arabic-2-column ascii chinese-big5-1
+               chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7
+               hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212
+               katakana-jisx0201 korean-ksc5601 latin-iso8859-1
+               latin-iso8859-2 thai-xtis vietnamese-viscii-lower)))
+    (Assert (equal 
+             (sort (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))))
+                   'string<)
+             '(arabic-1-column arabic-2-column ascii chinese-big5-1
+               chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7
+               hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212
+               katakana-jisx0201 korean-ksc5601 latin-iso8859-1
+               latin-iso8859-2 thai-xtis vietnamese-viscii-lower))))
   )