diff options
| author | Stefan Kangas | 2022-08-08 13:18:36 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-08-08 13:47:15 +0200 |
| commit | d8d13f2fccadfdd999a818a5c320f6d0f0d428fe (patch) | |
| tree | 9017de6c9f97a18726df1ca4ff327b75b00ae5f7 /test/src/coding-tests.el | |
| parent | 25636fcf5223341bf415a4014e643f4b2caa446d (diff) | |
| download | emacs-d8d13f2fccadfdd999a818a5c320f6d0f0d428fe.tar.gz emacs-d8d13f2fccadfdd999a818a5c320f6d0f0d428fe.zip | |
Remove redundant local variables in tests
* test/lisp/calc/calc-tests.el:
* test/lisp/progmodes/python-tests.el: Remove redundant local
variables.
* test/src/coding-tests.el: Pacify byte-compiler without using local
variable.
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 @@ | |||
| 61 | ;; Return the contents (specified by CONTENT-TYPE; ascii, latin, or | 61 | ;; Return the contents (specified by CONTENT-TYPE; ascii, latin, or |
| 62 | ;; binary) of a test file. | 62 | ;; binary) of a test file. |
| 63 | (defun coding-tests-file-contents (content-type) | 63 | (defun coding-tests-file-contents (content-type) |
| 64 | (let* ((ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") | 64 | (with-suppressed-warnings ((obsolete string-as-unibyte)) |
| 65 | (latin (concat ascii "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ\n")) | 65 | (let* ((ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") |
| 66 | (binary (string-to-multibyte | 66 | (latin (concat ascii "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ\n")) |
| 67 | (concat (string-as-unibyte latin) | 67 | (binary (string-to-multibyte |
| 68 | (unibyte-string #xC0 #xC1 ?\n))))) | 68 | (concat (string-as-unibyte latin) |
| 69 | (cond ((eq content-type 'ascii) ascii) | 69 | (unibyte-string #xC0 #xC1 ?\n))))) |
| 70 | ((eq content-type 'latin) latin) | 70 | (cond ((eq content-type 'ascii) ascii) |
| 71 | ((eq content-type 'binary) binary) | 71 | ((eq content-type 'latin) latin) |
| 72 | (t | 72 | ((eq content-type 'binary) binary) |
| 73 | (error "Invalid file content type: %s" content-type))))) | 73 | (t |
| 74 | (error "Invalid file content type: %s" content-type)))))) | ||
| 74 | 75 | ||
| 75 | ;; Generate FILE with CONTENTS encoded by CODING-SYSTEM. | 76 | ;; Generate FILE with CONTENTS encoded by CODING-SYSTEM. |
| 76 | ;; whose encoding specified by CODING-SYSTEM. | 77 | ;; whose encoding specified by CODING-SYSTEM. |
| @@ -429,9 +430,5 @@ | |||
| 429 | '((iso-latin-1 3) (us-ascii 1 3)))) | 430 | '((iso-latin-1 3) (us-ascii 1 3)))) |
| 430 | (should-error (check-coding-systems-region "å" nil '(bad-coding-system)))) | 431 | (should-error (check-coding-systems-region "å" nil '(bad-coding-system)))) |
| 431 | 432 | ||
| 432 | ;; Local Variables: | ||
| 433 | ;; byte-compile-warnings: (not obsolete) | ||
| 434 | ;; End: | ||
| 435 | |||
| 436 | (provide 'coding-tests) | 433 | (provide 'coding-tests) |
| 437 | ;;; coding-tests.el ends here | 434 | ;;; coding-tests.el ends here |