aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/coding-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/coding-tests.el')
-rw-r--r--test/src/coding-tests.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el
index 6bd8d1ae6c4..b27907027ba 100644
--- a/test/src/coding-tests.el
+++ b/test/src/coding-tests.el
@@ -148,21 +148,21 @@
148 148
149(defun coding-tests (content-type write-coding read-coding detected-coding 149(defun coding-tests (content-type write-coding read-coding detected-coding
150 &optional translator) 150 &optional translator)
151 (prefer-coding-system 'utf-8-auto) 151 (with-coding-priority '(utf-8-auto)
152 (let ((filename (coding-tests-filename content-type write-coding))) 152 (let ((filename (coding-tests-filename content-type write-coding)))
153 (with-temp-buffer 153 (with-temp-buffer
154 (let ((coding-system-for-read read-coding) 154 (let ((coding-system-for-read read-coding)
155 (contents (coding-tests-file-contents content-type)) 155 (contents (coding-tests-file-contents content-type))
156 (disable-ascii-optimization nil)) 156 (disable-ascii-optimization nil))
157 (if translator 157 (if translator
158 (setq contents (funcall translator contents))) 158 (setq contents (funcall translator contents)))
159 (insert-file-contents filename) 159 (insert-file-contents filename)
160 (if (and (coding-system-equal buffer-file-coding-system detected-coding) 160 (if (and (coding-system-equal buffer-file-coding-system detected-coding)
161 (string= (buffer-string) contents)) 161 (string= (buffer-string) contents))
162 nil 162 nil
163 (list buffer-file-coding-system 163 (list buffer-file-coding-system
164 (string-to-list (buffer-string)) 164 (string-to-list (buffer-string))
165 (string-to-list contents))))))) 165 (string-to-list contents))))))))
166 166
167(ert-deftest ert-test-coding-ascii () 167(ert-deftest ert-test-coding-ascii ()
168 (unwind-protect 168 (unwind-protect