diff options
Diffstat (limited to 'test/src/coding-tests.el')
-rw-r--r-- | test/src/coding-tests.el | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index de4ddb546df..f65d575d0c2 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el @@ -61,16 +61,17 @@ ;; Return the contents (specified by CONTENT-TYPE; ascii, latin, or ;; binary) of a test file. (defun coding-tests-file-contents (content-type) - (let* ((ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") - (latin (concat ascii "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ\n")) - (binary (string-to-multibyte - (concat (string-as-unibyte latin) - (unibyte-string #xC0 #xC1 ?\n))))) - (cond ((eq content-type 'ascii) ascii) - ((eq content-type 'latin) latin) - ((eq content-type 'binary) binary) - (t - (error "Invalid file content type: %s" content-type))))) + (with-suppressed-warnings ((obsolete string-as-unibyte)) + (let* ((ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") + (latin (concat ascii "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ\n")) + (binary (string-to-multibyte + (concat (string-as-unibyte latin) + (unibyte-string #xC0 #xC1 ?\n))))) + (cond ((eq content-type 'ascii) ascii) + ((eq content-type 'latin) latin) + ((eq content-type 'binary) binary) + (t + (error "Invalid file content type: %s" content-type)))))) ;; Generate FILE with CONTENTS encoded by CODING-SYSTEM. ;; whose encoding specified by CODING-SYSTEM. @@ -429,9 +430,5 @@ '((iso-latin-1 3) (us-ascii 1 3)))) (should-error (check-coding-systems-region "å" nil '(bad-coding-system)))) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; End: - (provide 'coding-tests) ;;; coding-tests.el ends here |