Mercurial > hg > xemacs-beta
diff tests/automated/mule-tests.el @ 4715:a357478dd457
Fix some test failures, mule-tests.el.
2009-10-12 Aidan Kehoe <kehoea@parhasard.net>
* automated/mule-tests.el :
Revert to the old Unicode mapping for scaron once we're finished
testing it.
Don't check the fixed-width coding systems with odd line endings
for ASCII-transparency; maybe we should, but that would require
that invalid sequence characters for on-disk ?\x0a be generated by
Macintosh line-ending coding systems, for example.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 12 Oct 2009 17:01:15 +0100 |
parents | 257b468bf2ca |
children | ad40dc9d3a97 |
line wrap: on
line diff
--- a/tests/automated/mule-tests.el Mon Oct 12 16:42:38 2009 +0100 +++ b/tests/automated/mule-tests.el Mon Oct 12 17:01:15 2009 +0100 @@ -427,12 +427,15 @@ ;;--------------------------------------------------------------- (let* ((scaron (make-char 'latin-iso8859-2 57))) ;; Used to try #x0000, but you can't change ASCII or Latin-1 - (loop for code in '(#x0100 #x2222 #x4444 #xffff) do + (loop + for code in '(#x0100 #x2222 #x4444 #xffff) + with initial-unicode = (char-to-unicode scaron) + do (progn (set-unicode-conversion scaron code) (Assert (eq code (char-to-unicode scaron))) - (Assert (eq scaron (unicode-to-char code '(latin-iso8859-2)))))) - + (Assert (eq scaron (unicode-to-char code '(latin-iso8859-2))))) + finally (set-unicode-conversion scaron initial-unicode)) (Check-Error wrong-type-argument (set-unicode-conversion scaron -10000))) (dolist (utf-8-char @@ -531,17 +534,16 @@ collect i)) do (when (and (eq 'fixed-width (coding-system-type coding-system)) - ;; Don't check the coding systems with autodetect, they are - ;; not round-trip compatible for the possible line-ending - ;; characters. - (string-match #r"-\(unix\|dos\|mac\)$" - (symbol-name coding-system))) + ;; Don't check the coding systems with odd line endings + ;; (maybe we should): + (eq 'lf (coding-system-eol-type coding-system))) ;; These coding systems are round-trip compatible with themselves. (Assert (equal (encode-coding-string (decode-coding-string all-possible-octets coding-system) coding-system) - all-possible-octets)))) + all-possible-octets) + (format "checking %s is transparent" coding-system)))) ;;--------------------------------------------------------------- ;; Test charset-in-* functions