Skip to content

Commit

Permalink
Add lexical-binding cookies to all test files to satisfy byte-compile…
Browse files Browse the repository at this point in the history
…r in Emacs snapshot; resolve some warnings resulting out of this.
  • Loading branch information
doublep committed Oct 26, 2023
1 parent 1e20f9a commit f248046
Show file tree
Hide file tree
Showing 52 changed files with 110 additions and 6 deletions.
2 changes: 2 additions & 0 deletions test/archives.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/autoloads.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/backtrace.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/basics.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/clean.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
11 changes: 7 additions & 4 deletions test/common.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'eldev)
(require 'eldev-vc)
(require 'ert)
Expand Down Expand Up @@ -366,10 +368,10 @@ beginning. Exit code of the process is bound as EXIT-CODE."
(defun eldev--test-line-list (multiline-string)
(split-string multiline-string "\n" t))

(defmacro eldev--test-canonicalize-bin/eldev-path (_result)
(let ((result (make-symbol "result")))
(defmacro eldev--test-canonicalize-bin/eldev-path (path)
(let ((result (make-symbol "$result")))
(if (eq system-type 'windows-nt)
`(let ((,result ,_result))
`(let ((,result ,path))
(if (string-match "^\\(.*/bin/eldev\\)" ,result)
(let* ((matched (match-string 1 ,result))
(replacement
Expand All @@ -379,7 +381,7 @@ beginning. Exit code of the process is bound as EXIT-CODE."
nil 'literal)))
(replace-match replacement nil 'literal ,result 1))
,result))
_result)))
path)))

(defmacro eldev--test-in-project-environment (&rest body)
`(let ((eldev-project-dir (eldev--test-project-dir))
Expand All @@ -395,6 +397,7 @@ beginning. Exit code of the process is bound as EXIT-CODE."
(eldev--test-delete-quietly nil ',files-to-delete)
(let* ((project-dir (eldev--test-project-dir))
(preexisting-files (eldev--test-find-files project-dir)))
(ignore preexisting-files)
(unwind-protect
(progn ,@body)
(eldev--test-delete-quietly nil ',files-to-delete)))))
Expand Down
2 changes: 2 additions & 0 deletions test/compile.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/dependencies.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/dependency-tree.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/doctor.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/emacs.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/eval.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/exec.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/extending.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/files.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/fileset.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/functions.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)

;; Testing various functions, macros etc. without particular relation to any command.
Expand Down
2 changes: 2 additions & 0 deletions test/help.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/info.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/init.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/install-self.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/buttercup.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/checkdoc.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/docker.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/doctor.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/ecukes.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/elisp-lint.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/global-cache.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/misc.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/package-lint.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/relint.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/integration/undercover.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/internals.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/lint.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/loading-modes.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/local-dependencies.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/maintainer.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)
(require 'eldev-plugins)

Expand Down
2 changes: 2 additions & 0 deletions test/misc.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/optional-dependencies.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/package.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/plugins.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/prepare.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/profile.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/robust-mode.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/runtime-dependencies.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/stable-unstable.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
5 changes: 3 additions & 2 deletions test/targets.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down Expand Up @@ -252,8 +254,7 @@
(should (= exit-code 0)))))))

(defun eldev--test-targets-combine (&rest lists)
(let ((targets (copy-sequence (pop lists)))
section)
(let ((targets (copy-sequence (pop lists))))
(dolist (list lists)
(while list
(let* ((section (pop list))
Expand Down
2 changes: 2 additions & 0 deletions test/test.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/upgrade-self.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/upgrade.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/version-requirement.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down
2 changes: 2 additions & 0 deletions test/version.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
;; -*- lexical-binding: t -*-

(require 'test/common)


Expand Down

0 comments on commit f248046

Please sign in to comment.