diff options
| author | Stefan Kangas | 2020-04-30 12:06:48 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2020-04-30 12:09:51 +0200 |
| commit | d386f1fb6213b2e6746ef9f2ebdde571f8d08124 (patch) | |
| tree | 824687b127d14b5d78b0c0cad35dad775a69970c /test | |
| parent | 44d824e7f05695751a3cbe7b64dc7bab6afa365c (diff) | |
| download | emacs-d386f1fb6213b2e6746ef9f2ebdde571f8d08124.tar.gz emacs-d386f1fb6213b2e6746ef9f2ebdde571f8d08124.zip | |
Use lexical-binding in most remaining emacs-lisp tests
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el:
* test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el:
* test/lisp/emacs-lisp/package-resources/simple-single-1.3.el:
* test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el:
* test/lisp/emacs-lisp/package-tests.el:
* test/lisp/emacs-lisp/shadow-resources/p1/foo.el:
* test/lisp/emacs-lisp/shadow-resources/p2/FOO.el: Use lexical-binding.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eitest-F, eitest-H, eitest-I, constructor, make-instance)
(initialize-instance, CNM-M):
* test/lisp/emacs-lisp/package-tests.el (with-package-test)
(package-test-update-archives, package-test-signed): Silence byte-compiler.
Diffstat (limited to 'test')
15 files changed, 48 insertions, 47 deletions
diff --git a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el index 60e49ab93a4..7be057db8b2 100644 --- a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el +++ b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; edebug-test-code.el --- Sample code for the Edebug test suite | 1 | ;;; edebug-test-code.el --- Sample code for the Edebug test suite -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2017-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2017-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el index b3e296db16b..73c3ea82e2d 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; eieio-testsinvoke.el -- eieio tests for method invocation | 1 | ;;; eieio-testsinvoke.el -- eieio tests for method invocation -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2005, 2008, 2010, 2013-2020 Free Software Foundation, | 3 | ;; Copyright (C) 2005, 2008, 2010, 2013-2020 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| @@ -83,36 +83,36 @@ | |||
| 83 | (defclass eitest-B-base2 () ()) | 83 | (defclass eitest-B-base2 () ()) |
| 84 | (defclass eitest-B (eitest-B-base1 eitest-B-base2) ()) | 84 | (defclass eitest-B (eitest-B-base1 eitest-B-base2) ()) |
| 85 | 85 | ||
| 86 | (defmethod eitest-F :BEFORE ((p eitest-B-base1)) | 86 | (defmethod eitest-F :BEFORE ((_p eitest-B-base1)) |
| 87 | (eieio-test-method-store :BEFORE 'eitest-B-base1)) | 87 | (eieio-test-method-store :BEFORE 'eitest-B-base1)) |
| 88 | 88 | ||
| 89 | (defmethod eitest-F :BEFORE ((p eitest-B-base2)) | 89 | (defmethod eitest-F :BEFORE ((_p eitest-B-base2)) |
| 90 | (eieio-test-method-store :BEFORE 'eitest-B-base2)) | 90 | (eieio-test-method-store :BEFORE 'eitest-B-base2)) |
| 91 | 91 | ||
| 92 | (defmethod eitest-F :BEFORE ((p eitest-B)) | 92 | (defmethod eitest-F :BEFORE ((_p eitest-B)) |
| 93 | (eieio-test-method-store :BEFORE 'eitest-B)) | 93 | (eieio-test-method-store :BEFORE 'eitest-B)) |
| 94 | 94 | ||
| 95 | (defmethod eitest-F ((p eitest-B)) | 95 | (defmethod eitest-F ((_p eitest-B)) |
| 96 | (eieio-test-method-store :PRIMARY 'eitest-B) | 96 | (eieio-test-method-store :PRIMARY 'eitest-B) |
| 97 | (call-next-method)) | 97 | (call-next-method)) |
| 98 | 98 | ||
| 99 | (defmethod eitest-F ((p eitest-B-base1)) | 99 | (defmethod eitest-F ((_p eitest-B-base1)) |
| 100 | (eieio-test-method-store :PRIMARY 'eitest-B-base1) | 100 | (eieio-test-method-store :PRIMARY 'eitest-B-base1) |
| 101 | (call-next-method)) | 101 | (call-next-method)) |
| 102 | 102 | ||
| 103 | (defmethod eitest-F ((p eitest-B-base2)) | 103 | (defmethod eitest-F ((_p eitest-B-base2)) |
| 104 | (eieio-test-method-store :PRIMARY 'eitest-B-base2) | 104 | (eieio-test-method-store :PRIMARY 'eitest-B-base2) |
| 105 | (when (next-method-p) | 105 | (when (next-method-p) |
| 106 | (call-next-method)) | 106 | (call-next-method)) |
| 107 | ) | 107 | ) |
| 108 | 108 | ||
| 109 | (defmethod eitest-F :AFTER ((p eitest-B-base1)) | 109 | (defmethod eitest-F :AFTER ((_p eitest-B-base1)) |
| 110 | (eieio-test-method-store :AFTER 'eitest-B-base1)) | 110 | (eieio-test-method-store :AFTER 'eitest-B-base1)) |
| 111 | 111 | ||
| 112 | (defmethod eitest-F :AFTER ((p eitest-B-base2)) | 112 | (defmethod eitest-F :AFTER ((_p eitest-B-base2)) |
| 113 | (eieio-test-method-store :AFTER 'eitest-B-base2)) | 113 | (eieio-test-method-store :AFTER 'eitest-B-base2)) |
| 114 | 114 | ||
| 115 | (defmethod eitest-F :AFTER ((p eitest-B)) | 115 | (defmethod eitest-F :AFTER ((_p eitest-B)) |
| 116 | (eieio-test-method-store :AFTER 'eitest-B)) | 116 | (eieio-test-method-store :AFTER 'eitest-B)) |
| 117 | 117 | ||
| 118 | (ert-deftest eieio-test-method-order-list-3 () | 118 | (ert-deftest eieio-test-method-order-list-3 () |
| @@ -136,7 +136,7 @@ | |||
| 136 | 136 | ||
| 137 | ;;; Test static invocation | 137 | ;;; Test static invocation |
| 138 | ;; | 138 | ;; |
| 139 | (defmethod eitest-H :STATIC ((class eitest-A)) | 139 | (defmethod eitest-H :STATIC ((_class eitest-A)) |
| 140 | "No need to do work in here." | 140 | "No need to do work in here." |
| 141 | 'moose) | 141 | 'moose) |
| 142 | 142 | ||
| @@ -147,15 +147,15 @@ | |||
| 147 | 147 | ||
| 148 | ;;; Return value from :PRIMARY | 148 | ;;; Return value from :PRIMARY |
| 149 | ;; | 149 | ;; |
| 150 | (defmethod eitest-I :BEFORE ((a eitest-A)) | 150 | (defmethod eitest-I :BEFORE ((_a eitest-A)) |
| 151 | (eieio-test-method-store :BEFORE 'eitest-A) | 151 | (eieio-test-method-store :BEFORE 'eitest-A) |
| 152 | ":before") | 152 | ":before") |
| 153 | 153 | ||
| 154 | (defmethod eitest-I :PRIMARY ((a eitest-A)) | 154 | (defmethod eitest-I :PRIMARY ((_a eitest-A)) |
| 155 | (eieio-test-method-store :PRIMARY 'eitest-A) | 155 | (eieio-test-method-store :PRIMARY 'eitest-A) |
| 156 | ":primary") | 156 | ":primary") |
| 157 | 157 | ||
| 158 | (defmethod eitest-I :AFTER ((a eitest-A)) | 158 | (defmethod eitest-I :AFTER ((_a eitest-A)) |
| 159 | (eieio-test-method-store :AFTER 'eitest-A) | 159 | (eieio-test-method-store :AFTER 'eitest-A) |
| 160 | ":after") | 160 | ":after") |
| 161 | 161 | ||
| @@ -174,17 +174,17 @@ | |||
| 174 | (defclass C (C-base1 C-base2) ()) | 174 | (defclass C (C-base1 C-base2) ()) |
| 175 | 175 | ||
| 176 | ;; Just use the obsolete name once, to make sure it also works. | 176 | ;; Just use the obsolete name once, to make sure it also works. |
| 177 | (defmethod constructor :STATIC ((p C-base1) &rest args) | 177 | (defmethod constructor :STATIC ((_p C-base1) &rest _args) |
| 178 | (eieio-test-method-store :STATIC 'C-base1) | 178 | (eieio-test-method-store :STATIC 'C-base1) |
| 179 | (if (next-method-p) (call-next-method)) | 179 | (if (next-method-p) (call-next-method)) |
| 180 | ) | 180 | ) |
| 181 | 181 | ||
| 182 | (defmethod make-instance :STATIC ((p C-base2) &rest args) | 182 | (defmethod make-instance :STATIC ((_p C-base2) &rest _args) |
| 183 | (eieio-test-method-store :STATIC 'C-base2) | 183 | (eieio-test-method-store :STATIC 'C-base2) |
| 184 | (if (next-method-p) (call-next-method)) | 184 | (if (next-method-p) (call-next-method)) |
| 185 | ) | 185 | ) |
| 186 | 186 | ||
| 187 | (cl-defmethod make-instance ((p (subclass C)) &rest args) | 187 | (cl-defmethod make-instance ((_p (subclass C)) &rest _args) |
| 188 | (eieio-test-method-store :STATIC 'C) | 188 | (eieio-test-method-store :STATIC 'C) |
| 189 | (cl-call-next-method) | 189 | (cl-call-next-method) |
| 190 | ) | 190 | ) |
| @@ -213,24 +213,24 @@ | |||
| 213 | (defclass D-base2 (D-base0) () :method-invocation-order :depth-first) | 213 | (defclass D-base2 (D-base0) () :method-invocation-order :depth-first) |
| 214 | (defclass D (D-base1 D-base2) () :method-invocation-order :depth-first) | 214 | (defclass D (D-base1 D-base2) () :method-invocation-order :depth-first) |
| 215 | 215 | ||
| 216 | (defmethod eitest-F ((p D)) | 216 | (defmethod eitest-F ((_p D)) |
| 217 | "D" | 217 | "D" |
| 218 | (eieio-test-method-store :PRIMARY 'D) | 218 | (eieio-test-method-store :PRIMARY 'D) |
| 219 | (call-next-method)) | 219 | (call-next-method)) |
| 220 | 220 | ||
| 221 | (defmethod eitest-F ((p D-base0)) | 221 | (defmethod eitest-F ((_p D-base0)) |
| 222 | "D-base0" | 222 | "D-base0" |
| 223 | (eieio-test-method-store :PRIMARY 'D-base0) | 223 | (eieio-test-method-store :PRIMARY 'D-base0) |
| 224 | ;; This should have no next | 224 | ;; This should have no next |
| 225 | ;; (when (next-method-p) (call-next-method)) | 225 | ;; (when (next-method-p) (call-next-method)) |
| 226 | ) | 226 | ) |
| 227 | 227 | ||
| 228 | (defmethod eitest-F ((p D-base1)) | 228 | (defmethod eitest-F ((_p D-base1)) |
| 229 | "D-base1" | 229 | "D-base1" |
| 230 | (eieio-test-method-store :PRIMARY 'D-base1) | 230 | (eieio-test-method-store :PRIMARY 'D-base1) |
| 231 | (call-next-method)) | 231 | (call-next-method)) |
| 232 | 232 | ||
| 233 | (defmethod eitest-F ((p D-base2)) | 233 | (defmethod eitest-F ((_p D-base2)) |
| 234 | "D-base2" | 234 | "D-base2" |
| 235 | (eieio-test-method-store :PRIMARY 'D-base2) | 235 | (eieio-test-method-store :PRIMARY 'D-base2) |
| 236 | (when (next-method-p) | 236 | (when (next-method-p) |
| @@ -256,21 +256,21 @@ | |||
| 256 | (defclass E-base2 (E-base0) () :method-invocation-order :breadth-first) | 256 | (defclass E-base2 (E-base0) () :method-invocation-order :breadth-first) |
| 257 | (defclass E (E-base1 E-base2) () :method-invocation-order :breadth-first) | 257 | (defclass E (E-base1 E-base2) () :method-invocation-order :breadth-first) |
| 258 | 258 | ||
| 259 | (defmethod eitest-F ((p E)) | 259 | (defmethod eitest-F ((_p E)) |
| 260 | (eieio-test-method-store :PRIMARY 'E) | 260 | (eieio-test-method-store :PRIMARY 'E) |
| 261 | (call-next-method)) | 261 | (call-next-method)) |
| 262 | 262 | ||
| 263 | (defmethod eitest-F ((p E-base0)) | 263 | (defmethod eitest-F ((_p E-base0)) |
| 264 | (eieio-test-method-store :PRIMARY 'E-base0) | 264 | (eieio-test-method-store :PRIMARY 'E-base0) |
| 265 | ;; This should have no next | 265 | ;; This should have no next |
| 266 | ;; (when (next-method-p) (call-next-method)) | 266 | ;; (when (next-method-p) (call-next-method)) |
| 267 | ) | 267 | ) |
| 268 | 268 | ||
| 269 | (defmethod eitest-F ((p E-base1)) | 269 | (defmethod eitest-F ((_p E-base1)) |
| 270 | (eieio-test-method-store :PRIMARY 'E-base1) | 270 | (eieio-test-method-store :PRIMARY 'E-base1) |
| 271 | (call-next-method)) | 271 | (call-next-method)) |
| 272 | 272 | ||
| 273 | (defmethod eitest-F ((p E-base2)) | 273 | (defmethod eitest-F ((_p E-base2)) |
| 274 | (eieio-test-method-store :PRIMARY 'E-base2) | 274 | (eieio-test-method-store :PRIMARY 'E-base2) |
| 275 | (when (next-method-p) | 275 | (when (next-method-p) |
| 276 | (call-next-method)) | 276 | (call-next-method)) |
| @@ -293,7 +293,7 @@ | |||
| 293 | (defclass eitest-Ja () | 293 | (defclass eitest-Ja () |
| 294 | ()) | 294 | ()) |
| 295 | 295 | ||
| 296 | (defmethod initialize-instance :after ((this eitest-Ja) &rest slots) | 296 | (defmethod initialize-instance :after ((_this eitest-Ja) &rest _slots) |
| 297 | ;(message "+Ja") | 297 | ;(message "+Ja") |
| 298 | ;; FIXME: Using next-method-p in an after-method is invalid! | 298 | ;; FIXME: Using next-method-p in an after-method is invalid! |
| 299 | (when (next-method-p) | 299 | (when (next-method-p) |
| @@ -304,7 +304,7 @@ | |||
| 304 | (defclass eitest-Jb () | 304 | (defclass eitest-Jb () |
| 305 | ()) | 305 | ()) |
| 306 | 306 | ||
| 307 | (defmethod initialize-instance :after ((this eitest-Jb) &rest slots) | 307 | (defmethod initialize-instance :after ((_this eitest-Jb) &rest _slots) |
| 308 | ;(message "+Jb") | 308 | ;(message "+Jb") |
| 309 | ;; FIXME: Using next-method-p in an after-method is invalid! | 309 | ;; FIXME: Using next-method-p in an after-method is invalid! |
| 310 | (when (next-method-p) | 310 | (when (next-method-p) |
| @@ -318,7 +318,7 @@ | |||
| 318 | (defclass eitest-Jd (eitest-Jc eitest-Ja) | 318 | (defclass eitest-Jd (eitest-Jc eitest-Ja) |
| 319 | ()) | 319 | ()) |
| 320 | 320 | ||
| 321 | (defmethod initialize-instance ((this eitest-Jd) &rest slots) | 321 | (defmethod initialize-instance ((_this eitest-Jd) &rest _slots) |
| 322 | ;(message "+Jd") | 322 | ;(message "+Jd") |
| 323 | (when (next-method-p) | 323 | (when (next-method-p) |
| 324 | (call-next-method)) | 324 | (call-next-method)) |
| @@ -357,7 +357,7 @@ | |||
| 357 | (call-next-method | 357 | (call-next-method |
| 358 | this (cons 'CNM-1-1 args)))) | 358 | this (cons 'CNM-1-1 args)))) |
| 359 | 359 | ||
| 360 | (defmethod CNM-M ((this CNM-1-2) args) | 360 | (defmethod CNM-M ((_this CNM-1-2) args) |
| 361 | (push (cons 'CNM-1-2 (copy-sequence args)) | 361 | (push (cons 'CNM-1-2 (copy-sequence args)) |
| 362 | eieio-test-call-next-method-arguments) | 362 | eieio-test-call-next-method-arguments) |
| 363 | (when (next-method-p) | 363 | (when (next-method-p) |
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el index 3c5aeaf708f..6979da8482b 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; eieio-test-persist.el --- Tests for eieio-persistent class | 1 | ;;; eieio-test-persist.el --- Tests for eieio-persistent class -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2011-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el b/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el index 3017b52ab54..4bad36080a1 100644 --- a/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el +++ b/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; faceup-test-mode.el --- Dummy major mode for testing `faceup'. | 1 | ;;; faceup-test-mode.el --- Dummy major mode for testing `faceup'. -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el b/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el index ab638ef932f..d8ab02b650e 100644 --- a/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el +++ b/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; faceup-test-this-file-directory.el --- Support file for faceup tests | 1 | ;;; faceup-test-this-file-directory.el --- Support file for faceup tests -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el b/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el index 0838981fcb9..3c9ec76cdf7 100644 --- a/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el +++ b/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; faceup-test-basics.el --- Tests for the `faceup' package. | 1 | ;;; faceup-test-basics.el --- Tests for the `faceup' package. -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el b/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el index 4f5fe180bb3..a87c16d66c0 100644 --- a/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el +++ b/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; faceup-test-files.el --- Self test of `faceup' using dummy major mode. | 1 | ;;; faceup-test-files.el --- Self test of `faceup' using dummy major mode. -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el b/test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el index 7251622fa59..61c1b045990 100644 --- a/test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el +++ b/test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; new-pkg.el --- A package only seen after "updating" archive-contents | 1 | ;;; new-pkg.el --- A package only seen after "updating" archive-contents -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Author: J. R. Hacker <jrh@example.com> | 3 | ;; Author: J. R. Hacker <jrh@example.com> |
| 4 | ;; Version: 1.0 | 4 | ;; Version: 1.0 |
diff --git a/test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el b/test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el index 7b1c00c06db..301993deb30 100644 --- a/test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el +++ b/test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; simple-single.el --- A single-file package with no dependencies | 1 | ;;; simple-single.el --- A single-file package with no dependencies -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Author: J. R. Hacker <jrh@example.com> | 3 | ;; Author: J. R. Hacker <jrh@example.com> |
| 4 | ;; Version: 1.4 | 4 | ;; Version: 1.4 |
diff --git a/test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el b/test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el index b58b658d024..cb003905bb5 100644 --- a/test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el +++ b/test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; simple-depend.el --- A single-file package with a dependency. | 1 | ;;; simple-depend.el --- A single-file package with a dependency. -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Author: J. R. Hacker <jrh@example.com> | 3 | ;; Author: J. R. Hacker <jrh@example.com> |
| 4 | ;; Version: 1.0 | 4 | ;; Version: 1.0 |
diff --git a/test/lisp/emacs-lisp/package-resources/simple-single-1.3.el b/test/lisp/emacs-lisp/package-resources/simple-single-1.3.el index 6756a28080b..9c3f427ff48 100644 --- a/test/lisp/emacs-lisp/package-resources/simple-single-1.3.el +++ b/test/lisp/emacs-lisp/package-resources/simple-single-1.3.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; simple-single.el --- A single-file package with no dependencies | 1 | ;;; simple-single.el --- A single-file package with no dependencies -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Author: J. R. Hacker <jrh@example.com> | 3 | ;; Author: J. R. Hacker <jrh@example.com> |
| 4 | ;; Version: 1.3 | 4 | ;; Version: 1.3 |
diff --git a/test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el b/test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el index 9cfe5c0d4e2..a0a9607350a 100644 --- a/test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el +++ b/test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; simple-two-depend.el --- A single-file package with two dependencies. | 1 | ;;; simple-two-depend.el --- A single-file package with two dependencies. -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Author: J. R. Hacker <jrh@example.com> | 3 | ;; Author: J. R. Hacker <jrh@example.com> |
| 4 | ;; Version: 1.1 | 4 | ;; Version: 1.1 |
diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 05770d6b58a..c0ed82c474a 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; package-test.el --- Tests for the Emacs package system | 1 | ;;; package-test.el --- Tests for the Emacs package system -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -143,8 +143,8 @@ | |||
| 143 | ,(if basedir `(cd ,basedir)) | 143 | ,(if basedir `(cd ,basedir)) |
| 144 | (unless (file-directory-p package-user-dir) | 144 | (unless (file-directory-p package-user-dir) |
| 145 | (mkdir package-user-dir)) | 145 | (mkdir package-user-dir)) |
| 146 | (cl-letf (((symbol-function 'yes-or-no-p) (lambda (&rest r) t)) | 146 | (cl-letf (((symbol-function 'yes-or-no-p) (lambda (&rest _) t)) |
| 147 | ((symbol-function 'y-or-n-p) (lambda (&rest r) t))) | 147 | ((symbol-function 'y-or-n-p) (lambda (&rest _) t))) |
| 148 | ,@(when install | 148 | ,@(when install |
| 149 | `((package-initialize) | 149 | `((package-initialize) |
| 150 | (package-refresh-contents) | 150 | (package-refresh-contents) |
| @@ -449,7 +449,7 @@ Must called from within a `tar-mode' buffer." | |||
| 449 | (ert-deftest package-test-update-archives () | 449 | (ert-deftest package-test-update-archives () |
| 450 | "Test updating package archives." | 450 | "Test updating package archives." |
| 451 | (with-package-test () | 451 | (with-package-test () |
| 452 | (let ((buf (package-list-packages))) | 452 | (let ((_buf (package-list-packages))) |
| 453 | (revert-buffer) | 453 | (revert-buffer) |
| 454 | (search-forward-regexp "^ +simple-single") | 454 | (search-forward-regexp "^ +simple-single") |
| 455 | (package-menu-mark-install) | 455 | (package-menu-mark-install) |
| @@ -593,6 +593,7 @@ Must called from within a `tar-mode' buffer." | |||
| 593 | (should (search-forward "This is a bare-bones readme file for the multi-file" | 593 | (should (search-forward "This is a bare-bones readme file for the multi-file" |
| 594 | nil t))))) | 594 | nil t))))) |
| 595 | 595 | ||
| 596 | (defvar epg-config--program-alist) ; Silence byte-compiler. | ||
| 596 | (ert-deftest package-test-signed () | 597 | (ert-deftest package-test-signed () |
| 597 | "Test verifying package signature." | 598 | "Test verifying package signature." |
| 598 | (skip-unless (let ((homedir (make-temp-file "package-test" t))) | 599 | (skip-unless (let ((homedir (make-temp-file "package-test" t))) |
| @@ -631,7 +632,7 @@ Must called from within a `tar-mode' buffer." | |||
| 631 | (should (progn (package-install 'signed-good) 'noerror)) | 632 | (should (progn (package-install 'signed-good) 'noerror)) |
| 632 | (should (progn (package-install 'signed-bad) 'noerror))) | 633 | (should (progn (package-install 'signed-bad) 'noerror))) |
| 633 | ;; Check if the installed package status is updated. | 634 | ;; Check if the installed package status is updated. |
| 634 | (let ((buf (package-list-packages))) | 635 | (let ((_buf (package-list-packages))) |
| 635 | (revert-buffer) | 636 | (revert-buffer) |
| 636 | (should (re-search-forward | 637 | (should (re-search-forward |
| 637 | "^\\s-+signed-good\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-" | 638 | "^\\s-+signed-good\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-" |
diff --git a/test/lisp/emacs-lisp/shadow-resources/p1/foo.el b/test/lisp/emacs-lisp/shadow-resources/p1/foo.el index 465038bee5e..ffe68f9356f 100644 --- a/test/lisp/emacs-lisp/shadow-resources/p1/foo.el +++ b/test/lisp/emacs-lisp/shadow-resources/p1/foo.el | |||
| @@ -1 +1 @@ | |||
| ;;; This file intentionally left blank. | ;;; This file intentionally left blank. -*- lexical-binding:t -*- | ||
diff --git a/test/lisp/emacs-lisp/shadow-resources/p2/FOO.el b/test/lisp/emacs-lisp/shadow-resources/p2/FOO.el index 465038bee5e..ffe68f9356f 100644 --- a/test/lisp/emacs-lisp/shadow-resources/p2/FOO.el +++ b/test/lisp/emacs-lisp/shadow-resources/p2/FOO.el | |||
| @@ -1 +1 @@ | |||
| ;;; This file intentionally left blank. | ;;; This file intentionally left blank. -*- lexical-binding:t -*- | ||