Mercurial > hg > xemacs-beta
comparison tests/automated/ccl-tests.el @ 4573:baf6c66f6f47
Correct the CCL programs used by the coding system in ccl-tests.el.
2009-01-03 Aidan Kehoe <kehoea@parhasard.net>
* automated/ccl-tests.el (ccl-test-setup):
Use sane CCL programs for decoding and encoding with the test CCL
coding system by default. Correct a spelling in the docstring, add
a safe-chars property so that we don't confuse
query-coding-tests.el.
(ccl-test-suites):
Explicitly re-initialise the CCL programs for the test coding
system once finished.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 03 Jan 2009 15:24:14 +0000 |
parents | 943eaba38521 |
children | a357478dd457 |
comparison
equal
deleted
inserted
replaced
4571:ebc01476e352 | 4573:baf6c66f6f47 |
---|---|
115 (aref ccl-test-last-register-state 1))) | 115 (aref ccl-test-last-register-state 1))) |
116 | 116 |
117 (defun ccl-test-setup () | 117 (defun ccl-test-setup () |
118 (define-ccl-program | 118 (define-ccl-program |
119 ccl-test-decoder | 119 ccl-test-decoder |
120 '(1 (read r0) | 120 '(1 (loop |
121 (loop | 121 (read r0) |
122 (write-read-repeat r0)))) | 122 (write-repeat r0)))) |
123 (define-ccl-program | 123 (define-ccl-program |
124 ccl-test-encoder | 124 ccl-test-encoder |
125 '(1 (read r0) | 125 '(1 (loop |
126 (loop | 126 (read r0) |
127 (write-read-repeat r0)))) | 127 (write-repeat r0)))) |
128 (or (find-coding-system 'ccl-test-coding-system) | 128 (or (find-coding-system 'ccl-test-coding-system) |
129 (make-coding-system | 129 (make-coding-system |
130 'ccl-test-coding-system | 130 'ccl-test-coding-system |
131 'ccl | 131 'ccl |
132 "CCL TEST temprary coding-system." | 132 "CCL TEST temporary coding-system." |
133 '(mnemonic "CCL-TEST" | 133 '(mnemonic "CCL-TEST" |
134 eol-type lf | 134 eol-type lf |
135 safe-chars t | |
135 decode ccl-test-decoder | 136 decode ccl-test-decoder |
136 encode ccl-test-encoder)))) | 137 encode ccl-test-encoder)))) |
137 | 138 |
138 ;;; Section 1. arithmetic operations. | 139 ;;; Section 1. arithmetic operations. |
139 | 140 |
599 (ccl-test-setup) | 600 (ccl-test-setup) |
600 (ccl-test-normal-expr) | 601 (ccl-test-normal-expr) |
601 (ccl-test-simple-read-and-write) | 602 (ccl-test-simple-read-and-write) |
602 (ccl-test-read-write-multibyte-character) | 603 (ccl-test-read-write-multibyte-character) |
603 (ccl-test-ccl-call) | 604 (ccl-test-ccl-call) |
604 (ccl-test-map-instructions)) | 605 (ccl-test-map-instructions) |
606 ;; Re-initialise the coding system: | |
607 (ccl-test-setup)) | |
605 | 608 |
606 ;;; start tests only when ccl-execute is enabled. | 609 ;;; start tests only when ccl-execute is enabled. |
607 (if (fboundp 'ccl-execute) | 610 (if (fboundp 'ccl-execute) |
608 (ccl-test-suites)) | 611 (ccl-test-suites)) |
609 | 612 |