[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d8d13f2fcc 2/3: Remove redundant local variables in tests
From: |
Stefan Kangas |
Subject: |
master d8d13f2fcc 2/3: Remove redundant local variables in tests |
Date: |
Mon, 8 Aug 2022 07:47:25 -0400 (EDT) |
branch: master
commit d8d13f2fccadfdd999a818a5c320f6d0f0d428fe
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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.
---
test/lisp/calc/calc-tests.el | 4 ----
test/lisp/progmodes/python-tests.el | 4 ----
test/src/coding-tests.el | 25 +++++++++++--------------
3 files changed, 11 insertions(+), 22 deletions(-)
diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el
index 64e59f5b9b..cd984f7ff7 100644
--- a/test/lisp/calc/calc-tests.el
+++ b/test/lisp/calc/calc-tests.el
@@ -818,7 +818,3 @@ An existing calc stack is reused, otherwise a new one is
created."
(provide 'calc-tests)
;;; calc-tests.el ends here
-
-;; Local Variables:
-;; bug-reference-url-format: "https://debbugs.gnu.org/%s"
-;; End:
diff --git a/test/lisp/progmodes/python-tests.el
b/test/lisp/progmodes/python-tests.el
index eb57122690..e3c8d5554a 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -6075,8 +6075,4 @@ buffer with overlapping strings."
(provide 'python-tests)
-;; Local Variables:
-;; indent-tabs-mode: nil
-;; End:
-
;;; python-tests.el ends here
diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el
index de4ddb546d..f65d575d0c 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