Backtrace from query-coding-tests [Success] XEmacs 21.5-b29 "garbanzo" f57bd954657a i386-apple-darwin9.8.0
[email protected] (Stephen J. Turnbull)
| Newsgroups | gmane.emacs.xemacs.build-reports,gmane.emacs.xemacs.beta |
|---|---|
| Message-ID | <[email protected]> |
Aidan, I can't figure out what's going on with query-coding-tests. If I run it by itself in an interactive session, no problem. If I run it by itself batch, no problem. If I run it from make by itself, no problem. But if I run a full make check (also LC_ALL=C make check), I get results similar to below. (That is, make check always gives an error on 344 tests, while LC_ALL=C make check barfs after 208; otherwise it's the same.) I have no idea what ISO 8859/13 has to do with it. Any ideas where to look? XEmacs has two patches applied, one to configure and sysdll.c, and one affecting MATCHSPEC behavior as discussed earlier. Diffs on request. diff -r aa4cae427255 ChangeLog --- a/ChangeLog Thu Feb 25 06:14:50 2010 -0600 +++ b/ChangeLog Fri Feb 26 02:53:40 2010 +0900 @@ -1,3 +1,13 @@ +2010-02-23 Stephen J. Turnbull <[email protected]> + + Use dlopen() on recent Mac OS X. + + * configure.ac (module support): + Check for dlopen() on Mac OS X (darwin), with fallback to dyld. + Report type of DSO support in Installation. + * configure: + Regenerate. + diff -r aa4cae427255 lisp/ChangeLog --- a/lisp/ChangeLog Thu Feb 25 06:14:50 2010 -0600 +++ b/lisp/ChangeLog Fri Feb 26 02:53:40 2010 +0900 @@ -187,6 +187,11 @@ compiled-function object almost every time, at compile time when all arguments are constant, and at runtime when they vary. +2010-02-20 Stephen J. Turnbull <[email protected]> + + * faces.el (face-property-matching-instance): + Document behavior of MATCHSPEC as upward compatible from 21.4. + diff -r aa4cae427255 src/ChangeLog --- a/src/ChangeLog Thu Feb 25 06:14:50 2010 -0600 +++ b/src/ChangeLog Fri Feb 26 02:53:40 2010 +0900 @@ -207,6 +207,10 @@ +2010-02-23 Stephen J. Turnbull <[email protected]> + + * sysdll.c (HAVE_LDTL): Eliminate preprocessor warning. + @@ -684,6 +688,22 @@ +2010-02-20 Stephen J. Turnbull <[email protected]> + + * specifier.c (maybe_charset_to_matchspec): + New function for 21.4 compatibility. + (Fspecifier_matching_instance): + Use it and document new behavior for all four functions. + (Fspecifier_matching_instantiator): + (Fspecifier_matching_instance_from_inst_list): + (Fspecifier_matching_instantiator_from_inst_list): + Use it. + + * objects.c (font_validate_matchspec): + De-obfuscate. + (font_instantiate): + Update preceding block comment, and fix a typo in it. + Note the tested XEmacs is f57bd954657a, forked from the mainline at aa4cae427255. > XEmacs Build Report generated by emacs-version > 21.5 (beta29) "garbanzo" 3f60221133bb XEmacs Lucid > with system-configuration > i386-apple-darwin9.8.0 > follows: > Contents of /Users/steve/src/XEmacs/sandbox/+build/Installation: > (Output from most recent run of ./configure) uname -a: Darwin stephen-turnbulls-macbook-pro.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 ../configure '--x-includes=/opt/local/include' '--x-libraries=/opt/local/lib' '--with-site-prefixes=/opt/local' '--with-xft=emacs,menubars,tabs,gauges' '--with-widgets=athena' '--with-athena=3d' '--with-mule' '--with-debug' '--with-error-checking=all' '--with-xim=no' '--with-memory-usage-stats' '--with-zlib' '--with-modules' '--with-bignum=gmp' '--with-union-type' '--with-compiler=gcc-mp-4.4' XEmacs 21.5-b29 "garbanzo" f57bd954657a configured for `i386-apple-darwin9.8.0'. Compilation Environment and Installation Defaults: Source code location: /Users/steve/src/XEmacs/sandbox Installation prefix: /usr/local Additional prefixes: /opt/local Not using any operating system description file Not using any machine description file Compiler version: gcc-mp-4.4 (GCC) 4.4.3 - GCC specs file: specs. - Compiler command: gcc-mp-4.4 -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts -Wpacked -Wpointer-arith -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wunused-parameter -g libc version: Relocating allocator for buffers: no GNU version of malloc: no - The GNU allocators don't work with this system configuration. Window System: Compiling in support for the X window system: - X Windows headers location: /opt/local/include - X Windows libraries location: /opt/local/lib - Handling WM_COMMAND properly. - Using fontconfig to manage fonts. - Compiling in support for Xft antialiased fonts (EXPERIMENTAL). Compiling in support for the Athena widget set: - Athena headers location: X11/Xaw3d - Athena library to link: Xaw3d Using Lucid menubars. - Using Xft to render antialiased fonts in menubars. WARNING: This Xft feature will be replaced with a face. Using Lucid scrollbars. Using Athena dialog boxes. Using Athena native widgets. - Using Xft to render antialiased fonts in tab controls. WARNING: This Xft feature will be replaced with a face. - Using Xft to render antialiased fonts in progress bars. WARNING: This Xft feature will be replaced with a face. WARNING: This Xft feature not yet implemented; setting ignored. TTY: Compiling in support for ncurses. Images: Compiling in support for GIF images. Compiling in support for XPM images. Compiling in support for PNG images. Compiling in support for JPEG images. Compiling in support for TIFF images. Sound: Databases: Compiling in support for Berkeley database. Compiling in support for GNU DBM. Compiling in support for LDAP. Internationalization: Compiling in support for Mule (multi-lingual Emacs). Mail: Compiling in support for "file" mail spool file locking method. Other Features: Inhibiting IPv6 canonicalization at startup. Compiling in support for dynamic shared object modules using "dlopen in -lc". Compiling in support for more number types using the GNU MP library. Using the union type for Lisp_Objects. WARNING: --------------------------------------------------------- WARNING: This tends to trigger compiler bugs, especially when WARNING: combined with MULE and ERROR_CHECKING. Crashes have WARNING: been seen with various versions of GCC (up to about 2.95), WARNING: and recently with Visual C++ as well (mid-2003). WARNING: More recent versions may be safer, or not. WARNING: --------------------------------------------------------- Using the new GC mark algorithms (KKCC). WARNING: --------------------------------------------------------- WARNING: The new algorithms are experimental. They are enabled by WARNING: default for this release. Use `--disable-kkcc' to WARNING: turn it off. WARNING: --------------------------------------------------------- Using the new portable dumper. Dumping into executable. Compiling in support for extra debugging code. Compiling in support for runtime error checking. WARNING: --------------------------------------------------------- WARNING: XEmacs will run noticeably more slowly as a result. WARNING: Error checking is on by default for XEmacs beta releases. WARNING: --------------------------------------------------------- > Contents of /Users/steve/src/XEmacs/sandbox/+build/beta.err > keeping lines matching > "^--\[\[\|\]\]$\|^\(cd\|n?make\)\s-\|errors?\|warnings?\|pure.*\(space\|size\)\|hides\b\|strange\|shadowings\|^Compil\(ing\s-+in\|ation\)\|^Using\|not\s-+found\|^While\s-+compiling.*\( \s-+.+\)*\|^Note:\|Installing\|[Ff]ile(s) copied\|\s-+tests\s-+\|^[A-Z] [^ ]+$\|^Wrong number of arguments:\|^ \*\* \|^\(FAIL\|SKIP\):" > and then deleting lines matching > "confl.*with.*auto-inlining\|^Formatting:\|^\s-*0 .*\(failure\|error\)s?\|^PASS:\|(100%) tests successful\|^checking for\|^\(Requiring\|Compiling\|Wrote\|\(Generating auto\|Computing custom-\)loads for\) " running CONFIG_SHELL=/bin/sh /bin/sh ../configure --x-includes=/opt/local/include --x-libraries=/opt/local/lib --with-site-prefixes=/opt/local --with-xft=emacs,menubars,tabs,gauges --with-widgets=athena --with-athena=3d --with-mule --with-debug --with-error-checking=all --with-xim=no --with-memory-usage-stats --with-zlib --with-modules --with-bignum=gmp --with-union-type --with-compiler=gcc-mp-4.4 --no-create --no-recursion Using configure-time autodetection only. Using configure-time autodetection only. Compilation Environment and Installation Defaults: Compiling in support for runtime error checking. make all cd ./lib-src && make all /Users/steve/src/XEmacs/sandbox/lib-src/getopt.h:107: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lib-src/getopt.h:107: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lib-src/getopt.c:949: warning: no previous prototype for 'getopt' /Users/steve/src/XEmacs/sandbox/lib-src/getopt.h:107: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lib-src/getopt.h:107: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lib-src/getopt.h:107: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lib-src/getopt.h:107: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lib-src/getopt.h:107: warning: function declaration isn't a prototype cd ./lwlib && make all /Users/steve/src/XEmacs/sandbox/lwlib/xlwradio.c:162: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lwlib/xlwradio.c:166: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lwlib/xlwcheckbox.c:175: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lwlib/xlwcheckbox.c:179: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lwlib/xlwgauge.c:194: warning: function declaration isn't a prototype /Users/steve/src/XEmacs/sandbox/lwlib/xlwgauge.c:199: warning: function declaration isn't a prototype cd ./src && make all /Users/steve/src/XEmacs/sandbox/src/objects-xlike-inc.c:114: warning: declaration of 'the_nonreloc' shadows a previous local /Users/steve/src/XEmacs/sandbox/src/objects-xlike-inc.c:97: warning: shadowed declaration is here /Users/steve/src/XEmacs/sandbox/src/font-mgr.c:512: warning: function declaration isn't a prototype Using load-path (/Users/steve/src/XEmacs/sandbox/lisp/) Using module-load-path (/Users/steve/src/XEmacs/sandbox/+build/modules) While compiling find-file-read-only in file /Users/steve/src/XEmacs/sandbox/lisp/files.el: ** Discarding the result of #'mapcar; maybe you meant #'mapc? While compiling drag-window-divider in file /Users/steve/src/XEmacs/sandbox/lisp/mouse.el: ** Discarding the result of #'mapcar*; maybe you meant #'mapc? ** Discarding the result of #'mapcar*; maybe you meant #'mapc? While compiling the end of the data in file /Users/steve/src/XEmacs/sandbox/lisp/menubar-items.el: ** the function bookmark-all-names is not known to be defined. Using load-path (/Users/steve/src/XEmacs/sandbox/lisp/) Using module-load-path (/Users/steve/src/XEmacs/sandbox/+build/modules) Using load-path (/Users/steve/src/XEmacs/sandbox/lisp/) Using module-load-path (/Users/steve/src/XEmacs/sandbox/+build/modules) While compiling Info-dir-outdated-p in file /Users/steve/src/XEmacs/sandbox/lisp/info.el: ** Discarding the result of #'mapcar; maybe you meant #'mapc? While compiling Info-dump-dir-entries: ** Discarding the result of #'mapcar; maybe you meant #'mapc? ** Discarding the result of #'mapcar; maybe you meant #'mapc? While compiling Info-rebuild-dir: ** Discarding the result of #'mapcar; maybe you meant #'mapc? While compiling hyper-apropos-get-doc in file /Users/steve/src/XEmacs/sandbox/lisp/hyper-apropos.el: ** Discarding the result of #'mapcar; maybe you meant #'mapc? cd ./modules/ldap && make all cd /Users/steve/src/XEmacs/sandbox/man && make info cd ./lib-src && make all cd ./lwlib && make all cd ./src && make all cd ./modules/ldap && make all cd /Users/steve/src/XEmacs/sandbox/man && make info cd ./src && make check base64-tests.el: 1234 of 1234 tests successful (100%). byte-compiler-tests.el: 104 of 104 tests successful (100%). c-tests.el: 104 of 104 tests successful (100%). case-tests.el: 9436 of 9436 tests successful (100%). ccl-tests.el: 4570 of 4570 tests successful (100%). database-tests.el: 20 of 20 tests successful (100%). extent-tests.el: 194 of 194 tests successful (100%). file-tests.el: 10 of 10 tests successful (100%). hash-table-tests.el: 9868 of 9868 tests successful (100%). iso-ir-196-test.el: 2 of 2 tests successful (100%). lisp-reader-tests.el: 52 of 52 tests successful (100%). lisp-tests.el: 8268 of 8268 tests successful (100%). md5-tests.el: 56 of 56 tests successful (100%). KNOWN BUG: (loop for i from 0 to 1114111 with exceptions = #<range-table [55296 57343] t [64976 65007] t [65534 65535] t 0x412ab5> do (unless (get-range-table i exceptions) (read (format (if (> i 65535) "?\\U%08X" "?\\u%04X") i))) finally return t) ==> error invalid-constant, as expected KNOWN BUG: (loop for i from 0 to 1114111 with exceptions = #<range-table [55296 57343] t [64976 65007] t [65534 65535] t 0x8ac7fa> do (unless (get-range-table i exceptions) (read (format (if (> i 65535) "?\\U%08X" "?\\u%04X") i))) finally return t) ==> error invalid-constant, as expected mule-tests.el: 1782 of 1784 tests successful ( 99%). KNOWN BUG: (loop for i from 0 to 1114111 with exceptions = #<range-table [55296 57343] t [64976 65007] t [65534 65535] t 0x412ab5> do (unless (get-range-table i exceptions) (read (format (if (> i 65535) "?\\U%08X" "?\\u%04X") i))) finally return t) ==> error invalid-constant, as expected KNOWN BUG: (loop for i from 0 to 1114111 with exceptions = #<range-table [55296 57343] t [64976 65007] t [65534 65535] t 0x8ac7fa> do (unless (get-range-table i exceptions) (read (format (if (> i 65535) "?\\U%08X" "?\\u%04X") i))) finally return t) ==> error invalid-constant, as expected 2 errors that should have been generated, but weren't os-tests.el: 10 of 10 tests successful (100%). 2 tests skipped because tac executable not found. SKIP: "Tests of call-process-region with region deleted after inserting tac process output." BECAUSE "tac executable not found" SKIP: "Tests of call-process-region with region deleted after inserting tac process output." BECAUSE "tac executable not found" Unexpected error (text-conversion-error "Coding system doesn't say what it can encode" iso-8859-13-unix) while executing interpreted code. Unexpected error (text-conversion-error "Coding system doesn't say what it can encode" iso-8859-13-unix) while executing byte-compiled code. query-coding-tests.el: 344 tests completed (aborted). Unexpected error (text-conversion-error "Coding system doesn't say what it can encode" iso-8859-13-unix) while executing interpreted code # bind (error-info error-info context-msg error-info) #<compiled-function (from "/Users/steve/src/XEmacs/sandbox/+build/lisp/test-harness.elc") (error-info) "...(50)" [test-harness-unexpected-error-enter-debugger noninteractive test-harness-bug-expected unexpected-test-file-failures context-msg error-info "executing interpreted code" princ format "Unexpected error %S while %s\n" message "Unexpected error %S while %s." error backtrace nil t debugger test-harness-unexpected-error-show-backtrace] 5>((text-conversion-error "Coding system doesn't say what it can encode" iso-8859-13-unix)) (save-current-buffer (set-buffer temp-buffer) (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-tabl! e) (query-coding-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (mul! tiple-value-bind (query-coding-succeeded query-coding-table) (! query-co ding-string (buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checkin! g that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding! -region (point-min) (point-max) (quote windows-1252-unix)) (As! sert (nu ll query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-codi! ng-table #<range-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote koi8-o-unix)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix") (! Assert (null query-coding-table) "checking that query-coding-r! egion su cceeds, koi8-o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (q! uery-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-end! ian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16 ut! f-16-lit tle-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars"))! (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking that unicode coding systems error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-conv! ersion-error-signalled t))) (Assert (null text-conversion-erro! r-signal led) "checking that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buffer! ) t) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ucs) 8364)) (Assert (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quot! e iso-8859-1) 1)) "check #'unencodable-char-position doesn't t! hink lat in-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-char-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-c! oding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behave! s given a string and list")) (with-current-buffer temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-cod! ing-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (multiple-value-b! ind (query-coding-succeeded query-coding-table) (query-coding-! string ( buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checking that query-! coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (poin! t-min) (point-max) (quote windows-1252-unix)) (Assert (null qu! ery-codi ng-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-coding-table #<ra! nge-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote koi8-o-unix)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix") (Assert (null ! query-coding-table) "checking that query-coding-region succeed! s, koi8- o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (query-coding-s! ucceeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-endian-bom-unix ! utf-8-bom-mac utf-32-little-endian-unix utf-16 utf-16-little-e! ndian-do s utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars")) (multiple-va! lue-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking that unicode coding systems error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-! signalled t))) (Assert (null text-conversion-error-signalled) ! "checkin g that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buffer) t) (Assert ! (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ucs) 8364)) (Assert (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1)! 1)) "check #'unencodable-char-position doesn't think latin-1 ! encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-char-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-coding-systems! -region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves given a str! ing and list")) (unwind-protect (with-current-buffer temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-t! able) (query-coding-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (! multiple-value-bind (query-coding-succeeded query-coding-table! ) (query -coding-string (buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "chec! king that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-cod! ing-region (point-min) (point-max) (quote windows-1252-unix)) ! (Assert (null query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-c! oding-table #<range-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote koi8-o-unix)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix"! ) (Assert (null query-coding-table) "checking that query-codin! g-region succeeds, koi8-o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind! (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-! endian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16! utf-16- little-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars! ")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking that unicode coding systems error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-c! onversion-error-signalled t))) (Assert (null text-conversion-e! rror-sig nalled) "checking that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buf! fer) t) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ucs) 8364)) (Assert (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (q! uote iso-8859-1) 1)) "check #'unencodable-char-position doesn'! t think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-char-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (chec! k-coding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region beh! aves given a string and list")) (and (buffer-name temp-buffer)! (kill-b uffer temp-buffer))) (let ((temp-buffer (get-buffer-create (generate-new-buffer-name " *temp*")))) (unwind-protect (with-current-buffer temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s! " coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null ! query-coding-table) "checking query-coding-string iso-8859-1-t! ranspare ncy")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeed! s, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max! )) (multiple-value-bind (query-coding-succeeded query-coding-t! able) (q uery-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checkin! g that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote koi8-o-unix)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t que! ry-coding-succeeded) "checking that query-coding-region succee! ds, koi8 -o-unix") (Assert (null query-coding-table) "checking that query-coding-region succeeds, koi8-o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking tha! t query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-! 32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-uni! x utf-16 -little-endian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16 utf-16-little-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null qu! ery-coding-table) "checking unicode coding systems succeed sans unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking that unicode coding systems error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min)! 173 coding-system (current-buffer) nil t) (text-conversion-er! ror (set q text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-! table) (query-coding-region (point-min) (point-max) coding-system (current-buffer) t) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ucs) 8364)) (Assert (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Ass! ert (equal (quote (257)) (unencodable-char-position (point-min! ) (point -max) (quote iso-8859-1) 1)) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-char-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check ! #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-coding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right)! (string< (car left) (car right)))))) "check #'check-coding-sy! stems-re gion behaves given a string and list")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (with-temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string asci! i-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (multiple-value-bind (query-codi! ng-succeeded query-coding-table) (query-coding-string (buffer-! string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checking that query-coding-region s! ucceeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-m! ax) (quote windows-1252-unix)) (Assert (null query-coding-succ! eeded) " check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-coding-table #<range-table [257 ! 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote koi8-o-unix)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix") (Assert (null query-coding-ta! ble) "checking that query-coding-region succeeds, koi8-o-unix"! )) (mult iple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (query-coding-succeeded query-! coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-endian-bom-unix utf-8-bom-mac u! tf-32-little-endian-unix utf-16 utf-16-little-endian-dos utf-1! 6-little -endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars")) (multiple-value-bind (query! -coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking that unicode coding systems error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) ! (Assert (null text-conversion-error-signalled) "checking that ! unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buffer) t) (Assert (null query-cod! ing-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ucs) 8364)) (Assert (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) "check #'u! nencodable-char-position doesn't think latin-1 encodes U+20AC"! ) (Asser t (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-char-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-coding-systems-region (point-! min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves given a string and list")) # bind (text-conversion-error-signalled unix-coding-system latin-1-chars-string ascii-chars-string) (let ((ascii-chars-string (apply (function string) (loop for i from 0 to 127 collect (int-to-char i)))) (latin-1-chars-string (apply (function string) (loop for i from 0 to 255 collect (int-to-char i)))) unix-coding-system text-conversion-error-signalled) (with-temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeeded (format "checking query-c! oding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string ! (buffer-string) (quote iso-8859-1-unix)) (Assert-eq t query-co! ding-suc ceeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query! -coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error") (delete-region (p! oint-min) (point-max)) (insert latin-1-chars-string) (decode-c! oding-re gion (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query-coding-succeeded query-codi! ng-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote koi8-o-unix)) (! multiple-value-bind (query-coding-succeeded query-coding-table! ) (query -coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix") (Assert (null query-coding-table) "checking that query-coding-region succeeds, koi8-o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161)! unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix u! tf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos u! tf-16-bo m-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-endian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16 utf-16-little-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region! (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "che! cking that unicode coding systems error correctly") (setq text! -convers ion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xb! de597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buffer) t) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ucs) 8364)) (Assert (= 257 (un! encodable-char-position (point-min) (point-max) (quote iso-885! 9-1))) " check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-char-position stops at 7 when! asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-coding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 15! 5 156 157 158 159))) (sort (check-coding-systems-region (buffe! r-string ) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves given a string and list"))) (if (featurep (quote mule)) (let ((ascii-chars-string (apply (function string) (loop for i from 0 to 127 collect (int-to-char i)))) (latin-1-chars-string (apply (function string) (loop for i from 0 to 255 collect (int-to-char i)))) unix-coding-system text-conversion-error-signalled) (with-temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeed! ed (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-! table) (query-coding-string (buffer-string) (quote iso-8859-1-! unix)) ( Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeede! d query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversi! on-error") (delete-region (point-min) (point-max)) (insert lat! in-1-cha rs-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query! -coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point! -max) (quote koi8-o-unix)) (multiple-value-bind (query-coding-! succeede d query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix") (Assert (null query-coding-table) "checking that query-coding-region succeeds, koi8-o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [15! 5 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-! endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-d! os ucs-4 -little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-endian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16 utf-16-little-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding! -table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-con! version-error-signalled "checking that unicode coding systems ! error co rrectly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-seq! uence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buffer) t) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote uc! s) 8364)) (Assert (= 257 (unencodable-char-position (point-min! ) (point -max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-c! har-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-coding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 14! 8 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-! coding-s ystems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves given a string and list")))) (when (featurep (quote mule)) (let ((ascii-chars-string (apply (function string) (loop for i from 0 to 127 collect (int-to-char i)))) (latin-1-chars-string (apply (function string) (loop for i from 0 to 255 collect (int-to-char i)))) unix-coding-system text-conversion-error-signalled) (with-temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix-coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succe! eded (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-codin! g-table) (query-coding-string (buffer-string) (quote iso-8859-! 1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succee! ded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conver! sion-error") (delete-region (point-min) (point-max)) (insert l! atin-1-c hars-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (que! ry-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbde266> "check query-coding-region fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (poi! nt-max) (quote koi8-o-unix)) (multiple-value-bind (query-codin! g-succee ded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix") (Assert (null query-coding-table) "checking that query-coding-region succeeds, koi8-o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [! 155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-littl! e-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16! -dos ucs -4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-endian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16 utf-16-little-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-codi! ng-table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-c! onversion-error-signalled "checking that unicode coding system! s error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-s! equence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buffer) t) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ! ucs) 8364)) (Assert (= 257 (unencodable-char-position (point-m! in) (poi nt-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable! -char-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-coding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list") (Assert (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 ! 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (chec! k-coding -systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves given a string and list")))) (lambda nil (defvar passes) (defvar assertion-failures) (defvar no-error-failures) (defvar wrong-error-failures) (defvar missing-message-failures) (defvar other-failures) (defvar trick-optimizer) (require (quote bytecomp)) (when (featurep (quote mule)) (let ((ascii-chars-string (apply (function string) (loop for i from 0 to 127 collect (int-to-char i)))) (latin-1-chars-string (apply (function string) (loop for i from 0 to 255 collect (int-to-char i)))) unix-coding-system text-conversion-error-signalled) (with-temp-buffer (insert ascii-chars-string) (dolist (coding-system (delete-duplicates (mapcar (function (lambda (coding-system) (unless (coding-system-alias-p coding-system) (setq unix-coding-system (subsidiary-coding-system (coding-system-base coding-system) (quote lf))) (when (and (equal ascii-chars-string (encode-coding-string ascii-chars-string unix-coding-system)) (not (memq (coding-system-type unix-coding-system) (quote (undecided chain mswindows-multibyte))))) unix! -coding-system)))) (coding-system-list nil)) :test (function eq))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-region ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-region ASCII-transparency, %s" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string ascii-chars-string coding-system) (Assert-eq t query-coding-succeeded (format "checking query-coding-string ASCII-transparency, %s" coding-system)) (Assert (null query-coding-table) (format "checking query-coding-string ASCII-transparency, %s" coding-system)))) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert-eq t que! ry-coding-succeeded "checking query-coding-region iso-8859-1-t! ranspare ncy") (Assert (null query-coding-table) "checking query-coding-region iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-8859-1-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-string iso-8859-1-transparency") (Assert (null query-coding-table) "checking query-coding-string iso-8859-1-transparency")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-string (buffer-string) (quote iso-latin-1-with-esc-unix)) (Assert-eq t query-coding-succeeded "checking query-coding-region iso-latin-1-with-esc-transparency") (Assert (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency")) (insert (decode-char (quote ucs) 8364)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-r! egion fails, U+20AC, iso-8859-1") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde0b7> "checking query-coding-region fails correctly, U+20AC, iso-8859-1")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote iso-latin-1-with-esc-unix)) (Assert query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1")) (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (point-max) (quote iso-8859-1-unix) (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) (po! int-max) (quote iso-latin-1-with-esc-unix) nil nil t) (text-co! nversion -error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote windows-1252-unix)) (goto-char (point-max)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbde1aa> "check query-coding-region fails, windows-1252, invalid-sequences")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert-eq t query-codi! ng-succeeded "checking that query-coding-region succeeds, U+20AC, windows-1252") (Assert (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252")) (insert ?\^À) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix) (current-buffer) t) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, U+0080, windows-1252") (Assert-equal query-coding-table #<range-table [257 258) unencodable 0xbde219> "checking that query-coding-region fails, U+0080, windows-1252")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252") (Assert-equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) inva! lid-sequence [257 258) unencodable 0xbde266> "check query-codi! ng-regio n fails, U+0080, invalid-sequence, cp1252")) (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (decode-coding-region (point-min) (point-max) (quote koi8-o-unix)) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-o-unix)) (Assert (eq t query-coding-succeeded) "checking that query-coding-region succeeds, koi8-o-unix") (Assert (null query-coding-table) "checking that query-coding-region succeeds, koi8-o-unix")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote escape-quoted)) (Assert-eq t query-coding-succeeded "checking that query-coding-region succeeds, escape-quoted") (Assert (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote windows-1252-unix)) (Assert (null query-co! ding-succeeded) "checking that query-coding-region fails, windows-1252 and Cyrillic") (Assert (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbde341>) "checking that query-coding-region fails, windows-1252 and Cyrillic")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) (quote koi8-r-unix)) (Assert (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters") (Assert (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbde396>) "checking that query-coding-region fails, koi8-r and OCS characters")) (delete-region (point-min) (p! oint-max)) (insert latin-1-chars-string) (decode-coding-region! (point- min) (point-max) (quote greek-iso-8bit-with-esc)) (dolist (coding-system (quote (utf-16-mac ucs-4-mac utf-16-little-endian-bom-dos ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-endian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16 utf-16-little-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system) (Assert (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars") (Assert-equal qu! ery-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbde44b> "checking unicode coding systems fail with unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) 173 coding-system) (Assert-eq t query-coding-succeeded "checking unicode coding systems succeed sans unmapped chars") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 174 209 coding-system) (Assert (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again") (Assert (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again")) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region 210 254 coding-system) (Assert-eq t query-coding-succeeded) (Assert (null query-coding-table))) (se! tq text-conversion-error-signalled nil) (condition-case nil (q! uery-cod ing-region (point-min) (point-max) coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert text-conversion-error-signalled "checking that unicode coding systems error correctly") (setq text-conversion-error-signalled nil) (condition-case nil (query-coding-region (point-min) 173 coding-system (current-buffer) nil t) (text-conversion-error (setq text-conversion-error-signalled t))) (Assert (null text-conversion-error-signalled) "checking that unicode coding systems do not error when unnecessary")) (delete-region (point-min) (point-max)) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (insert (decode-coding-string "ÿÿÿÿ" (quote utf-8))) (insert (decode-coding-string "ÿÿÿÿ" (quote greek-iso-8bit-with-esc))) (dolist (coding-system (quote (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (po! int-max) coding-system) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars and invalid seqs" coding-system)) (Assert-equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbde597> (format "checking %s fails with unmapped chars and invalid seqs" coding-system))) (multiple-value-bind (query-coding-succeeded query-coding-table) (query-coding-region (point-min) (point-max) coding-system (current-buffer) t) (Assert (null query-coding-succeeded) (format "checking %s fails with unmapped chars sans invalid seqs" coding-system)) (Assert (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbde5e4>) (format "checking %s fails correctly, unmapped chars sans invalid seqs" coding-system)))) (Assert (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC") (Assert (equal "" (encode-coding-char (! decode-char (quote ucs) 8364) (quote windows-1252))) "check #'! encode-c oding-char doesn't think windows-1252 handles U+0080") (delete-region (point-min) (point-max)) (insert latin-1-chars-string) (insert (decode-char (quote ucs) 8364)) (Assert (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC") (Assert (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics") (dotimes (i 6) (insert (decode-char (quote ucs) 8364))) (Assert-equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1) "check #'unencodable-char-position stops at 1 when asked to") (Assert-equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote! iso-8859-1) 4) "check #'unencodable-char-position stops at 4 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7) "check #'unencodable-char-position stops at 7 when asked to") (Assert-equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000) "check #'unencodable-char-position stops at 7 if 2000 asked for") (Assert (null (check-coding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works") (Assert (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) ! "check #'check-coding-systems-region behaves well given a list! ") (Asse rt (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves given a string and list")))))() call-with-condition-handler(#<compiled-function (from "/Users/steve/src/XEmacs/sandbox/+build/lisp/test-harness.elc") (error-info) "...(50)" [test-harness-unexpected-error-enter-debugger noninteractive test-harness-bug-expected unexpected-test-file-failures context-msg error-info "executing interpreted code" princ format "Unexpected error %S while %s\n" message "Unexpected error %S while %s." error backtrace nil t debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function (from "/Users/steve/src/XEmacs/sandbox/+build/lisp/test-harness.elc") nil "...(5)" [inbuffer test-harness-read-from-buffer] 2>) # (condition-case ... . ((error (message "Test suite execution aborted.")))) # bind (standard-output passes assertion-failures no-error-failures wrong-error-failures missing-message-failures other-failures unexpected-test-file-failures skipped-test-reasons trick-optimizer debug-on-error filename inbuffer) # (condition-case ... . ((error (byte-code "ÂÃ! !ÂÄ!ÅÆ\"Ç Æ" [error-info file princ ">>Error occurred processing " ": " display-error nil terpri] 3)))) # bind (--dolist-temp--88359 file-in-dir --dolist-temp--88354 file error) # bind (error-data) # (condition-case ... . error) Unexpected error (text-conversion-error "Coding system doesn't say what it can encode" iso-8859-13-unix) while executing byte-compiled code # bind (error-info error-info context-msg error-info) #<compiled-function (from "/Users/steve/src/XEmacs/sandbox/+build/lisp/test-harness.elc") (error-info) "...(50)" [test-harness-unexpected-error-enter-debugger noninteractive test-harness-bug-expected unexpected-test-file-failures context-msg error-info "executing byte-compiled code" princ format "Unexpected error %S while %s\n" message "Unexpected error %S while %s." error backtrace nil t debugger test-harness-unexpected-error-show-backtrace] 5>((text-conversion-error "Coding system doesn't say what it can encode" iso-8859-13-unix)) # bind (temp-buffer ascii-chars-string latin-1-chars-string unix-coding-system text-conversion-error-signalled) #<compiled-function nil "...(1630)" [G93746 latin-1-chars-string coding-system i query-coding-table query-coding-succeeded require bytecomp featurep mule apply string 0 nil 127 int-to-char 255 get-buffer-create generate-new-buffer-name " *temp*" ((byte-code "Á!«Â!Á" [temp-buffer buffer-name kill-buffer] 2)) mapcar #<compiled-function (coding-system) "...(31)" [ascii-chars-string coding-system unix-coding-system coding-system-alias-p subsidiary-coding-system coding-system-base lf encode-coding-string coding-system-type (undecided chain mswindows-multibyte)] 4> coding-system-list delq 2 query-coding-region (call-with-condition-handler #<compiled-function (error-info) "...(151)" [noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded coding-system error-info cl-assertion-failed Print-Failure format "%S, " "checking query-coding-region ASCII-transparency, %s" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "As! sertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing case = %S" "%S ==> error: %S" debugger other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(109)" [debugger noninteractive test-harness-bug-expected assertion-failures coding-system error-info cl-assertion-failed Print-Failure format "checking query-coding-region ASCII-transparency, %s" "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (null query-coding-table) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-! enter-debugger test-harness-assertion-failure-show-backtrace t! est-harn ess-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 7> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) query-coding-string (call-with-condition-handler #<compiled-function (error-info) "...(151)" [noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded coding-system error-info cl-assertion-failed Print-Failure format "%S, " "checking query-coding-string ASCII-transparency, %s" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing case = %S" "%S ==> error: %S" debugger other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-funct! ion nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(109)" [debugger noninteractive test-harness-bug-expected assertion-failures coding-system error-info cl-assertion-failed Print-Failure format "checking query-coding-string ASCII-transparency, %s" "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (null query-coding-table) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 7> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) iso-8859-1-unix (call-with-condition-hand! ler #<compiled-function (error-info) "...(137)" [debugger noni! nteracti ve test-harness-bug-expected assertion-failures query-coding-succeeded error-info cl-assertion-failed Print-Failure format "%S, " "checking query-coding-region iso-8859-1-transparency" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed! : %S; failing case = %S" (null query-coding-table) "checking query-coding-region iso-8859-1-transparency" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) buffer-string (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded error-info cl-assertion-failed Print-Failure format "%S, " "checking query-coding-string iso-8859-1-transparency" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing! case = %S" "%S ==> error: %S" other-failures test-harness-as! sertion- failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking query-coding-string iso-8859-1-transparency" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-fai! led (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) iso-latin-1-with-esc-unix (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded error-info cl-assertion-failed Print-Failure format "%S, " "checking query-coding-region iso-latin-1-with-esc-transparency" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-c! ondition-handler #<compiled-function (error-info) "...(83)" [o! ther-fai lures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking query-coding-region iso-latin-1-with-esc-transparency" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) decode-char ucs 8364 (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-succeeded) "checking that query-coding-region ! fails, U+20AC, iso-8859-1" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-table error-info cl-assertion-failed Print-Failure format "%S, " "checking query-coding-region fails correctly, U+20AC, iso-8859-1" "%S should be `%s' to %S but isn't" equal #<range-table [257 258) unencodable 0xbe6032> "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal query-coding-table #<range-table [257 258) unencodable 0xbe6032>) error backtrace nil t "%S ==> err! or: %S; failing case = %S" "%S ==> error: %S" other-failures ! test-har ness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [257 258) unencodable 0xbe6032> signal cl-assertion-failed (equal query-coding-table #<range-table [257 258) unencodable 0xbe6032>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" query-coding-succeeded "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-! unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, iso-latin-with-esc-unix-1" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (byte-code "ÀedÁpÂÃ&" [query-coding-region iso-8859-1-uni! x nil t] 7) ((text-conversion-error (byte-code "Á" [text-co! nversion -error-signalled t] 2))) G93747 G93730 G93731 G93732 G93733 G93734 G93735 G93736 G93737 G93738 G93739 G93740 G93741 G93742 G93748 G93749 G93750 G93751 G93752 G93753 text-conversion-error-signalled cl-seq G93727 G93728 --dolist-temp--93729 --dolist-temp--93743 --dolist-temp--93744 ascii-chars-string temp-buffer begin --dotimes-temp--93745 unix-coding-system (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" text-conversion-error-signalled "checking query-coding-region signals text-conversion-error correctly" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [t! ext-conversion-error-signalled passes signal cl-assertion-failed Print-Pass "%S"] 3>) ((cl-assertion-failed)) (byte-code "ÀedÁÂÃ&" [query-coding-region iso-latin-1-with-esc-unix nil t] 7) ((text-conversion-error (byte-code "Á" [text-conversion-error-signalled t] 2))) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null text-conversion-error-signalled) "checking query-coding-region doesn't signal text-conversion-error" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [text-conversion-error-signalled passes signal cl-assertion-failed (null text-conv! ersion-error-signalled) Print-Pass "%S"] 3>) ((cl-assertion-fa! iled)) d ecode-coding-region windows-1252-unix (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-succeeded) "check query-coding-region fails, windows-1252, invalid-sequences" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-table error-info cl-assertion-failed Pri! nt-Failure format "%S, " "check query-coding-region fails, windows-1252, invalid-sequences" "%S should be `%s' to %S but isn't" equal #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbe6125> "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbe6125>) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbe6125> signal cl-assertion-fai! led (equal query-coding-table #<range-table [130 131) invalid-! sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence 0xbe6125>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) t (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded error-info cl-assertion-failed Print-Failure format "%S, " "checking that query-coding-region succeeds, U+20AC, windows-1252" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] ! 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking that query-coding-region succeeds, U+20AC, windows-1252" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) ?\^À (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion! failed: %S; failing case = %S" (null query-coding-succeeded) ! "checkin g that query-coding-region fails, U+0080, windows-1252" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-table error-info cl-assertion-failed Print-Failure format "%S, " "checking that query-coding-region fails, U+0080, windows-1252" "%S should be `%s' to %S but isn't" equal #<range-table [257 258) unencodable 0xbe6194> "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal query-coding-table #<range-table [257 258) unencodable 0xbe6194>) error ba! cktrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [257 258) unencodable 0xbe6194> signal cl-assertion-failed (equal query-coding-table #<range-table [257 258) unencodable 0xbe6194>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-succeeded) "check query-coding-region fails, U+0080, invalid-sequence, cp1252" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-! assertion-failure-show-backtrace test-harness-unexpected-error! -enter-d ebugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-table error-info cl-assertion-failed Print-Failure format "%S, " "check query-coding-region fails, U+0080, invalid-sequence, cp1252" "%S should be `%s' to %S but isn't" equal #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbe61e1> "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbe61e1>) error backtrace nil t "%S ==> erro! r: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbe61e1> signal cl-assertion-failed (equal query-coding-table #<range-table [130 131) invalid-sequence [142 143) invalid-sequence [144 146) invalid-sequence [158 159) invalid-sequence [257 258) unencodable 0xbe61e1>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) koi8-o-unix (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (eq t query-codi! ng-succeeded) "checking that query-coding-region succeeds, koi! 8-o-unix " error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking that query-coding-region succeeds, koi8-o-unix" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace]! 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) escape-quoted (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded error-info cl-assertion-failed Print-Failure format "%S, " "checking that query-coding-region succeeds, escape-quoted" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-codi! ng-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (ca! ll-with- condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking that query-coding-region succeeds, escape-quoted" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-s! ucceeded) "checking that query-coding-region fails, windows-1252 and Cyrillic" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) une! ncodable [193 257) unencodable 0xbe62bc>) "checking that query! -coding- region fails, windows-1252 and Cyrillic" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbe62bc> signal cl-assertion-failed (equal query-coding-table #<range-table [129 131) unencodable [132 133) unencodable [139 140) unencodable [141 146) unencodable [155 156) unencodable [157 161) unencodable [162 170) unencodable [173 176) unencodable [178 187) unencodable [189 192) unencodable [193 257) unencodable 0xbe62bc>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) koi8-r-un! ix (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-succeeded) "checking that query-coding-region fails, koi8-r and OCS characters" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; fai! ling case = %S" (equal query-coding-table #<range-table [129 1! 54) unen codable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbe6311>) "checking that query-coding-region fails, koi8-r and OCS characters" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbe6311> signal cl-assertion-failed (equal query-coding-table #<range-table [129 154) unencodable [155 161) unencodable [162 164) unencodable [165 177) unencodable [178 180) unencodable [181 192) unencodable 0xbe6311>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) greek-iso-8bit-with-esc (utf-16-mac ucs-4-mac utf-16-little-endian-bom-d! os ucs-4-dos utf-16-little-endian-mac utf-16-bom-unix utf-16-little-endian ucs-4 utf-16-dos ucs-4-little-endian-dos utf-16-bom-mac utf-16-bom utf-16-unix utf-32-unix utf-32-little-endian utf-32-dos utf-32 utf-32-little-endian-dos utf-8-bom utf-16-bom-dos ucs-4-unix utf-16-little-endian-bom-unix utf-8-bom-mac utf-32-little-endian-unix utf-16 utf-16-little-endian-dos utf-16-little-endian-bom-mac utf-8-bom-dos ucs-4-little-endian-mac utf-8-bom-unix utf-32-little-endian-mac utf-8-dos utf-8-unix utf-32-mac utf-8-mac utf-16-little-endian-unix ucs-4-little-endian ucs-4-little-endian-unix utf-8 utf-16-little-endian-bom) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-succeeded) "checking unicode coding systems fail with unmapped chars" error backtrace nil t "%S ==> error! : %S; failing case = %S" test-harness-assertion-failure-enter! -debugge r test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-table error-info cl-assertion-failed Print-Failure format "%S, " "checking unicode coding systems fail with unmapped chars" "%S should be `%s' to %S but isn't" equal #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbe63c6> "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbe63c6>) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-! failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbe63c6> signal cl-assertion-failed (equal query-coding-table #<range-table [173 174) unencodable [209 210) unencodable [254 255) unencodable 0xbe63c6>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) 173 (call-with-condition-handler #<compiled-function (error-info) "...(137)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded error-info cl-assertion-failed Print-Failure format "%S, " "checking unicode coding systems succeed sans unmapped chars" "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S =! => error: %S; failing case = %S" "%S ==> error: %S" other-fai! lures te st-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table pa! sses signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) 174 209 (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (eq t query-coding-succeeded) "checking unicode coding systems succeed sans unmapped chars, again" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-h! arness-bug-expected assertion-failures error-info cl-assertion! -failed Print-Failure "Assertion failed: %S; failing case = %S" (null query-coding-table) "checking unicode coding systems succeed sans unmapped chars again" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>) ((cl-assertion-failed)) 210 254 (call-with-condition-handler #<compiled-function (error-info) "...(117)" [debugger noninteractive test-harness-bug-expected assertion-failures query-coding-succeeded error-info cl-assertion-failed Print-Failure format "%S should be `%s' to %S but isn't" t eq "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (eq t query-coding-succeeded) error backtrace nil "%S ==> error: %S; failing case = %S" "%S ==> erro! r: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 9> #<compiled-function nil "...(21)" [query-coding-succeeded passes t signal cl-assertion-failed (eq t query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S" (null query-coding-table) nil error backtrace t "%S ==> error: %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [query-coding-table passes signal cl-assertion-failed (null query-coding-table) Print-Pass "%S"] 3>! ) ((cl-assertion-failed)) (byte-code "ÁedpÂÃ&" [coding-syst! em query -coding-region nil t] 7) ((text-conversion-error (byte-code "Á" [text-conversion-error-signalled t] 2))) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" text-conversion-error-signalled "checking that unicode coding systems error correctly" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [text-conversion-error-signalled passes signal cl-assertion-failed Print-Pass "%S"] 3>) ((cl-assertion-failed)) (byte-code "ÁeÂpÃÄ&" [coding-system query-coding-region 173 nil t] 7) ((text-conversion-error (byte-code "Á" [text-conversion-error-signalled t] 2))) (! call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null text-conversion-error-signalled) "checking that unicode coding systems do not error when unnecessary" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(19)" [text-conversion-error-signalled passes signal cl-assertion-failed (null text-conversion-error-signalled) Print-Pass "%S"] 3>) ((cl-assertion-failed)) decode-coding-string "ÿÿÿÿ" utf-8 (utf-8 utf-16 utf-16-little-endian utf-32 utf-32-little-endian) (call-with-condition-handler #<compiled-function (error-info) "...(109)" [debugger noninteractive test-harn! ess-bug-expected assertion-failures coding-system error-info c! l-assert ion-failed Print-Failure format "checking %s fails with unmapped chars and invalid seqs" "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (null query-coding-succeeded) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 7> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(151)" [noninteractive test-harness-bug-expected assertion-failures query-coding-table coding-system error-info cl-assertion-failed Print-Failure format "%S, " "checking %s fails with unmapped chars and invalid seqs" "%S should be `%s' to %S but isn't" equal #<range-table [1 5) unencodable ! [5 9) invalid-sequence [9 13) unencodable 0xbe6512> "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbe6512>) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" debugger other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 10> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbe6512> signal cl-assertion-failed (equal query-coding-table #<range-table [1 5) unencodable [5 9) invalid-sequence [9 13) unencodable 0xbe6512>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(109)" [debugger noninteractive test-harness-bug-expected assertion-failure! s coding-system error-info cl-assertion-failed Print-Failure f! ormat "c hecking %s fails with unmapped chars sans invalid seqs" "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (null query-coding-succeeded) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 7> #<compiled-function nil "...(19)" [query-coding-succeeded passes signal cl-assertion-failed (null query-coding-succeeded) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(109)" [debugger noninteractive test-harness-bug-expected assertion-failures coding-system error-info cl-assertion-failed Print-Failure format "checking %s fails correctly, unmapped chars sans invalid seqs" "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal query-coding-table #<range-table [1 5) unenco! dable [9 13) unencodable 0xbe655f>) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" other-failures test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 7> #<compiled-function nil "...(21)" [query-coding-table passes #<range-table [1 5) unencodable [9 13) unencodable 0xbe655f> signal cl-assertion-failed (equal query-coding-table #<range-table [1 5) unencodable [9 13) unencodable 0xbe655f>) Print-Pass "%S"] 3>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) "check #'encode-coding-char doesn't think iso-8859-1 handles U+20AC! " error backtrace nil t "%S ==> error: %S; failing case = %S"! test-ha rness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(25)" [passes encode-coding-char decode-char ucs 8364 iso-8859-1 signal cl-assertion-failed (null (encode-coding-char (decode-char (quote ucs) 8364) (quote iso-8859-1))) Print-Pass "%S"] 4>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) "check #'encode-coding-char doesn't think windows-1252 handles U+0080" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-u! nexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(27)" [passes encode-coding-char decode-char ucs 8364 windows-1252 "" signal cl-assertion-failed (equal "" (encode-coding-char (decode-char (quote ucs) 8364) (quote windows-1252))) Print-Pass "%S"] 4>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compile! d-function nil "...(25)" [passes 257 unencodable-char-position! iso-885 9-1 signal cl-assertion-failed (= 257 (unencodable-char-position (point-min) (point-max) (quote iso-8859-1))) Print-Pass "%S"] 5>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) "check #'unencodable-char-position doesn't think latin-1 encodes U+20AC" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(26)" [passes unencodable-char-position iso-8859-1 1 (257) signal cl-assertion-failed (equal (quote (257)) (unencodable-char-position (point-min) (! point-max) (quote iso-8859-1) 1)) Print-Pass "%S"] 5>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) "check #'unencodable-char-position has some borked GNU semantics" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(26)" [passes unencodable-char-position iso-8859-1 0 (257) signal cl-assertion-failed (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 0)) Print-Pass "%S"] 5>) ((cl-assertion-failed)) 6 (! call-with-condition-handler #<compiled-function (error-info) "! ...(155) " [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure format "%S, " "check #'unencodable-char-position stops at 1 when asked to" "%S should be `%s' to %S but isn't" (257) equal unencodable-char-position iso-8859-1 1 "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 14> #<compiled-function nil "...(26)" [passes unencodable-char-position iso-8859-1 1 (257) signal cl-assertion-failed (equal (quote (257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 1)) Print-Pass "%S"] 5>) ((cl-assertion-failed)) (call-with-con! dition-handler #<compiled-function (error-info) "...(155)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure format "%S, " "check #'unencodable-char-position stops at 4 when asked to" "%S should be `%s' to %S but isn't" (260 259 258 257) equal unencodable-char-position iso-8859-1 4 "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal (quote (260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 4)) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 14> #<compiled-function nil "...(26)" [passes unencodable-char-position iso-8859-1 4 (260 259 258 257) signal cl-assertion-failed (equal (quote (260 259 258 257)) (unencodable-char-position ! (point-min) (point-max) (quote iso-8859-1) 4)) Print-Pass "%S"! ] 5>) (( cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(155)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure format "%S, " "check #'unencodable-char-position stops at 7 when asked to" "%S should be `%s' to %S but isn't" (263 262 261 260 259 258 257) equal unencodable-char-position iso-8859-1 7 "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7)) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 14> #<compiled-function nil "...(26)" [passes unencodable-char-position iso-8859-1 7 (263 262 261 260 259 258 257) signal cl-assert! ion-failed (equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 7)) Print-Pass "%S"] 5>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(155)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure format "%S, " "check #'unencodable-char-position stops at 7 if 2000 asked for" "%S should be `%s' to %S but isn't" (263 262 261 260 259 258 257) equal unencodable-char-position iso-8859-1 2000 "Assertion failed: %S; failing case = %S" "Assertion failed: %S" (equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000)) error backtrace nil t "%S ==> error: %S; failing case = %S" "%S ==> error: %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-! unexpected-error-show-backtrace] 14> #<compiled-function nil "! ...(26)" [passes unencodable-char-position iso-8859-1 2000 (263 262 261 260 259 258 257) signal cl-assertion-failed (equal (quote (263 262 261 260 259 258 257)) (unencodable-char-position (point-min) (point-max) (quote iso-8859-1) 2000)) Print-Pass "%S"] 5>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (null (check-coding-systems-region (point-min) (point-max) (quote (utf-8)))) "check #'check-coding-systems-region gives nil if encoding works" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(23)" [passes check-coding-systems-region (utf-8) si! gnal cl-assertion-failed (null (check-coding-systems-region (point-min) (point-max) (quote (utf-8)))) Print-Pass "%S"] 4>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-failed Print-Failure "Assertion failed: %S; failing case = %S" (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves well given a list" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harnes! s-unexpected-error-enter-debugger test-harness-unexpected-erro! r-show-b acktrace] 5> #<compiled-function nil "...(28)" [passes sort check-coding-systems-region (utf-8 iso-8859-1 windows-1252) #<compiled-function (left right) "...(6)" [right left] 2> ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160)) signal cl-assertion-failed (equal (quote ((iso-8859-1 257 258 259 260 261 262 263) (windows-1252 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160))) (sort (check-coding-systems-region (point-min) (point-max) (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) Print-Pass "%S"] 5>) ((cl-assertion-failed)) (call-with-condition-handler #<compiled-function (error-info) "...(83)" [other-failures debugger noninteractive test-harness-bug-expected assertion-failures error-info cl-assertion-fai! led Print-Failure "Assertion failed: %S; failing case = %S" (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) "check #'check-coding-systems-region behaves given a string and list" error backtrace nil t "%S ==> error: %S; failing case = %S" test-harness-assertion-failure-enter-debugger test-harness-assertion-failure-show-backtrace test-harness-unexpected-error-enter-debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function nil "...(29)" [passes sort check-coding-systems-region buffer-string nil (utf-8 iso-8859-1 windows-1252) #<compiled-function (left right) "...(6)" [right left] 2> ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129! 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 1! 45 146 1 47 148 149 150 151 152 153 154 155 156 157 158 159)) signal cl-assertion-failed (equal (quote ((iso-8859-1 256 257 258 259 260 261 262) (windows-1252 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159))) (sort (check-coding-systems-region (buffer-string) nil (quote (utf-8 iso-8859-1 windows-1252))) (function (lambda (left right) (string< (car left) (car right)))))) Print-Pass "%S"] 5>) ((cl-assertion-failed))] 11>() call-with-condition-handler(#<compiled-function (from "/Users/steve/src/XEmacs/sandbox/+build/lisp/test-harness.elc") (error-info) "...(50)" [test-harness-unexpected-error-enter-debugger noninteractive test-harness-bug-expected unexpected-test-file-failures context-msg error-info "executing byte-compiled code" princ format "Unexpected error %S while %s\n" message "Unexpected error %S while %s." error backtrace nil t debugger test-harness-unexpected-error-show-backtrace] 5> #<compiled-function (from "/Users/steve/src/XEmacs/sandbox/+build/lisp/test-harness.elc") nil "...(6)" [code] 1>) # (condition-case ... . ((error (message "Test suite execution aborted.")))) # bind (code test-harness-test-compiled standard-output passes assertion-failures no-error-failures wrong-error-failures missing-message-failures other-failures unexpected-test-file-failures skipped-test-reasons trick-optimizer debug-on-error filename inbuffer) # (condition-case ... . ((error (byte-code "ÂÃ! !ÂÄ!ÅÆ\"Ç Æ" [error-info file princ ">>Error occurred processing " ": " display-error nil terpri] 3)))) # bind (--dolist-temp--88359 file-in-dir --dolist-temp--88354 file error) # bind (error-data) # (condition-case ... . error) regexp-tests.el: 422 of 422 tests successful (100%). region-tests.el: 28 of 28 tests successful (100%). search-tests.el: 120 of 120 tests successful (100%). symbol-tests.el: 252 of 252 tests successful (100%). KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (scan-error "Unbalanced parentheses" 23 1) KNOWN BUG: (Assert (backward-up-list-moves-point-from-to 23 3)) ==> error scan-error, as expected KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (scan-error "Unbalanced parentheses" 23 1) KNOWN BUG: (Assert (backward-up-list-moves-point-from-to 23 3)) ==> error scan-error, as expected syntax-tests.el: 84 of 92 tests successful ( 91%). KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (scan-error "Unbalanced parentheses" 23 1) KNOWN BUG: (Assert (backward-up-list-moves-point-from-to 23 3)) ==> error scan-error, as expected KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (scan-error "Unbalanced parentheses" 23 1) KNOWN BUG: (Assert (backward-up-list-moves-point-from-to 23 3)) ==> error scan-error, as expected 2 errors that should have been generated, but weren't tag-tests.el: 6 of 6 tests successful (100%). weak-tests.el: 140 of 140 tests successful (100%). base64-tests.el: 1234 of 1234 tests successful (100%). byte-compiler-tests.el: 104 of 104 tests successful (100%). c-tests.el: 104 of 104 tests successful (100%). case-tests.el: 9436 of 9436 tests successful (100%). ccl-tests.el: 4570 of 4570 tests successful (100%). database-tests.el: 20 of 20 tests successful (100%). extent-tests.el: 194 of 194 tests successful (100%). file-tests.el: 10 of 10 tests successful (100%). hash-table-tests.el: 9868 of 9868 tests successful (100%). iso-ir-196-test.el: 2 of 2 tests successful (100%). lisp-reader-tests.el: 52 of 52 tests successful (100%). lisp-tests.el: 8268 of 8268 tests successful (100%). md5-tests.el: 56 of 56 tests successful (100%). mule-tests.el: 1782 of 1784 tests successful ( 99%). os-tests.el: 10 of 10 tests successful (100%). query-coding-tests.el: 344 tests completed (aborted). regexp-tests.el: 422 of 422 tests successful (100%). region-tests.el: 28 of 28 tests successful (100%). search-tests.el: 120 of 120 tests successful (100%). symbol-tests.el: 252 of 252 tests successful (100%). syntax-tests.el: 84 of 92 tests successful ( 91%). tag-tests.el: 6 of 6 tests successful (100%). weak-tests.el: 140 of 140 tests successful (100%).