Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
4582:00ed9903a988 | 4583:2669b1b7e33b |
---|---|
444 (encode-coding-string xemacs-character 'escape-quoted))) | 444 (encode-coding-string xemacs-character 'escape-quoted))) |
445 (Assert (equal (concat "\033%G" utf-8-char) | 445 (Assert (equal (concat "\033%G" utf-8-char) |
446 (encode-coding-string xemacs-character 'ctext)))))) | 446 (encode-coding-string xemacs-character 'ctext)))))) |
447 | 447 |
448 (loop | 448 (loop |
449 for (code-point encoded) | 449 for (code-point utf-16-big-endian utf-16-little-endian) |
450 in '((#x10000 "\xd8\x00\xdc\x00") | 450 in '((#x10000 "\xd8\x00\xdc\x00" "\x00\xd8\x00\xdc") |
451 (#x10FFFD "\xdb\xff\xdf\xfd")) | 451 (#x10FFFD "\xdb\xff\xdf\xfd" "\xff\xdb\xfd\xdf")) |
452 do (Assert (equal (encode-coding-string | 452 do |
453 (decode-char 'ucs code-point) 'utf-16) | 453 (Assert (equal (encode-coding-string |
454 encoded))) | 454 (decode-char 'ucs code-point) 'utf-16) |
455 utf-16-big-endian)) | |
456 (Assert (equal (encode-coding-string | |
457 (decode-char 'ucs code-point) 'utf-16-le) | |
458 utf-16-little-endian)) | |
459 | |
455 | 460 |
456 ;;--------------------------------------------------------------- | 461 ;;--------------------------------------------------------------- |
457 ;; Regression test for a couple of CCL-related bugs. | 462 ;; Regression test for a couple of CCL-related bugs. |
458 ;;--------------------------------------------------------------- | 463 ;;--------------------------------------------------------------- |
459 | 464 |