Mercurial > hg > xemacs-beta
comparison tests/automated/mule-tests.el @ 3970:949ac151a10d
[xemacs-hg @ 2007-05-20 20:09:20 by aidan]
Test that all listed langenv input methods exist; comment out those we can't
support while using 21.4 to compile our packages.
author | aidan |
---|---|
date | Sun, 20 May 2007 20:09:40 +0000 |
parents | 3584cb2c07db |
children | d76663859e32 |
comparison
equal
deleted
inserted
replaced
3969:a7c03016302e | 3970:949ac151a10d |
---|---|
325 (Assert (equal (substring string (* 94 k) (* 94 (1+ k))) ascii-string)))) | 325 (Assert (equal (substring string (* 94 k) (* 94 (1+ k))) ascii-string)))) |
326 | 326 |
327 ;;--------------------------------------------------------------- | 327 ;;--------------------------------------------------------------- |
328 ;; Test file-system character conversion (and, en passant, file ops) | 328 ;; Test file-system character conversion (and, en passant, file ops) |
329 ;;--------------------------------------------------------------- | 329 ;;--------------------------------------------------------------- |
330 (let* ((scaron (make-char 'latin-iso8859-2 57)) | 330 (let* ((dstroke (make-char 'latin-iso8859-2 80)) |
331 (latin2-string (make-string 4 scaron)) | 331 (latin2-string (make-string 4 dstroke)) |
332 (prefix (concat (file-name-as-directory | 332 (prefix (concat (file-name-as-directory |
333 (file-truename (temp-directory))) | 333 (file-truename (temp-directory))) |
334 latin2-string)) | 334 latin2-string)) |
335 (name1 (make-temp-name prefix)) | |
336 (name2 (make-temp-name prefix)) | |
337 (file-name-coding-system | 335 (file-name-coding-system |
338 ;; 'iso-8859-X doesn't work on darwin (as of "Panther" 10.3), it | 336 ;; 'iso-8859-X doesn't work on darwin (as of "Panther" 10.3), it |
339 ;; seems to know that file-name-coding-system is definitely utf-8 | 337 ;; seems to know that file-name-coding-system is definitely utf-8 |
340 (if (string-match "darwin" system-configuration) | 338 (if (string-match "darwin" system-configuration) |
341 'utf-8 | 339 'utf-8 |
342 'iso-8859-2)) | 340 'iso-8859-2)) |
343 ) | 341 ;; make-temp-name does stat(), which on OS X requires that you |
342 ;; normalise, where open() will normalise for you. Previously we | |
343 ;; used scaron as the Latin-2 character, and make-temp-name errored | |
344 ;; on OS X. LATIN CAPITAL LETTER D WITH STROKE does decompose. | |
345 (name1 (make-temp-name prefix)) | |
346 (name2 (make-temp-name prefix))) | |
347 ;; This is how you suppress output from `message', called by `write-region' | |
344 (Assert (not (equal name1 name2))) | 348 (Assert (not (equal name1 name2))) |
345 (Assert (not (file-exists-p name1))) | 349 (Assert (not (file-exists-p name1))) |
346 ;; This is how you suppress output from `message', called by `write-region' | |
347 (Silence-Message | 350 (Silence-Message |
348 (write-region (point-min) (point-max) name1)) | 351 (write-region (point-min) (point-max) name1)) |
349 (Assert (file-exists-p name1)) | 352 (Assert (file-exists-p name1)) |
350 (when (fboundp 'make-symbolic-link) | 353 (when (fboundp 'make-symbolic-link) |
351 (make-symbolic-link name1 name2) | 354 (make-symbolic-link name1 name2) |
352 (Assert (file-exists-p name2)) | 355 (Assert (file-exists-p name2)) |
353 (Assert (equal (file-truename name2) name1)) | 356 (Assert (equal (file-truename name2) name1)) |
354 (Assert (equal (file-truename name1) name1))) | 357 (Assert (equal (file-truename name1) name1))) |
355 | 358 (ignore-file-errors (delete-file name1) (delete-file name2))) |
356 (ignore-file-errors (delete-file name1) (delete-file name2))) | |
357 | 359 |
358 ;; Add many more file operation tests here... | 360 ;; Add many more file operation tests here... |
359 | 361 |
360 ;;--------------------------------------------------------------- | 362 ;;--------------------------------------------------------------- |
361 ;; Test Unicode-related functions | 363 ;; Test Unicode-related functions |
473 '(arabic-1-column arabic-2-column ascii chinese-big5-1 | 475 '(arabic-1-column arabic-2-column ascii chinese-big5-1 |
474 chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7 | 476 chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7 |
475 hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212 | 477 hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212 |
476 katakana-jisx0201 korean-ksc5601 latin-iso8859-1 | 478 katakana-jisx0201 korean-ksc5601 latin-iso8859-1 |
477 latin-iso8859-2 thai-xtis vietnamese-viscii-lower)))) | 479 latin-iso8859-2 thai-xtis vietnamese-viscii-lower)))) |
480 | |
481 ;; Language environments. | |
482 (dolist (language (mapcar 'car language-info-alist)) | |
483 (set-language-environment language) | |
484 (Assert (equal language current-language-environment)) | |
485 (set-input-method (get-language-info language 'input-method)) | |
486 (Assert (equal (get-language-info language 'input-method) | |
487 current-input-method)) | |
488 (dolist (charset (get-language-info language 'charset)) | |
489 (Assert (charsetp (find-charset charset)))) | |
490 (dolist (coding-system (get-language-info language 'coding-system)) | |
491 (Assert (coding-system-p (find-coding-system coding-system)))) | |
492 (dolist (coding-system (get-language-info language 'coding-system)) | |
493 (Assert (coding-system-p (find-coding-system coding-system))))) | |
478 | 494 |
479 (with-temp-buffer | 495 (with-temp-buffer |
480 (flet | 496 (flet |
481 ((Assert-elc-is-escape-quoted () | 497 ((Assert-elc-is-escape-quoted () |
482 "Assert the current buffer has an escape-quoted cookie if compiled." | 498 "Assert the current buffer has an escape-quoted cookie if compiled." |