aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Kangas2020-08-29 20:55:46 +0200
committerStefan Kangas2020-08-29 22:41:51 +0200
commit2aeff0794a2b2b86ffe4325a8c677ebbfb2afa1f (patch)
treecb728d6209697b76f62084e82c7f92019e375743 /test
parente709c187fde76573ea3ec3a5f14e09b9ed59525f (diff)
downloademacs-2aeff0794a2b2b86ffe4325a8c677ebbfb2afa1f.tar.gz
emacs-2aeff0794a2b2b86ffe4325a8c677ebbfb2afa1f.zip
Use lexical-binding in more tests
* test/lib-src/emacsclient-tests.el: * test/lisp/emacs-lisp/hierarchy-tests.el: * test/lisp/eshell/eshell-tests.el: * test/lisp/gnus/gnus-util-tests.el: * test/lisp/progmodes/js-tests.el: * test/lisp/textmodes/bibtex-tests.el: * test/src/editfns-tests.el: * test/src/fns-tests.el: Use lexical-binding. * test/lisp/emacs-lisp/hierarchy-tests.el (hierarchy-leafs-includes-lonely-roots): * test/src/editfns-tests.el (transpose-test-get-byte-positions): * test/src/fns-tests.el (fns-tests-func-arity): Adjust for lexical-binding.
Diffstat (limited to 'test')
-rw-r--r--test/lib-src/emacsclient-tests.el2
-rw-r--r--test/lisp/emacs-lisp/hierarchy-tests.el4
-rw-r--r--test/lisp/eshell/eshell-tests.el4
-rw-r--r--test/lisp/gnus/gnus-util-tests.el2
-rw-r--r--test/lisp/progmodes/js-tests.el2
-rw-r--r--test/lisp/textmodes/bibtex-tests.el2
-rw-r--r--test/src/editfns-tests.el6
-rw-r--r--test/src/fns-tests.el6
8 files changed, 15 insertions, 13 deletions
diff --git a/test/lib-src/emacsclient-tests.el b/test/lib-src/emacsclient-tests.el
index 901922c03e1..a502bb782f2 100644
--- a/test/lib-src/emacsclient-tests.el
+++ b/test/lib-src/emacsclient-tests.el
@@ -1,4 +1,4 @@
1;;; emacsclient-tests.el --- Test emacsclient 1;;; emacsclient-tests.el --- Test emacsclient -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 2016-2020 Free Software Foundation, Inc. 3;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
4 4
diff --git a/test/lisp/emacs-lisp/hierarchy-tests.el b/test/lisp/emacs-lisp/hierarchy-tests.el
index 23cfc79d848..41d3f2f3ccf 100644
--- a/test/lisp/emacs-lisp/hierarchy-tests.el
+++ b/test/lisp/emacs-lisp/hierarchy-tests.el
@@ -1,4 +1,4 @@
1;;; hierarchy-tests.el --- Tests for hierarchy.el 1;;; hierarchy-tests.el --- Tests for hierarchy.el -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 2017-2019 Damien Cassou 3;; Copyright (C) 2017-2019 Damien Cassou
4 4
@@ -274,7 +274,7 @@
274 '(dove pigeon dolphin cow))))) 274 '(dove pigeon dolphin cow)))))
275 275
276(ert-deftest hierarchy-leafs-includes-lonely-roots () 276(ert-deftest hierarchy-leafs-includes-lonely-roots ()
277 (let ((parentfn (lambda (item) nil)) 277 (let ((parentfn (lambda (_) nil))
278 (hierarchy (hierarchy-new))) 278 (hierarchy (hierarchy-new)))
279 (hierarchy-add-tree hierarchy 'foo parentfn) 279 (hierarchy-add-tree hierarchy 'foo parentfn)
280 (should (equal (hierarchy-leafs hierarchy) 280 (should (equal (hierarchy-leafs hierarchy)
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index 16a04647723..1b93fb0fbbc 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -1,4 +1,4 @@
1;;; tests/eshell-tests.el --- Eshell test suite 1;;; tests/eshell-tests.el --- Eshell test suite -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1999-2020 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2020 Free Software Foundation, Inc.
4 4
@@ -61,6 +61,8 @@
61 (eshell-insert-command text func) 61 (eshell-insert-command text func)
62 (eshell-match-result regexp)) 62 (eshell-match-result regexp))
63 63
64(defvar eshell-history-file-name)
65
64(defun eshell-test-command-result (command) 66(defun eshell-test-command-result (command)
65 "Like `eshell-command-result', but not using HOME." 67 "Like `eshell-command-result', but not using HOME."
66 (let ((eshell-directory-name (make-temp-file "eshell" t)) 68 (let ((eshell-directory-name (make-temp-file "eshell" t))
diff --git a/test/lisp/gnus/gnus-util-tests.el b/test/lisp/gnus/gnus-util-tests.el
index b01e2fc2966..7eadb0de716 100644
--- a/test/lisp/gnus/gnus-util-tests.el
+++ b/test/lisp/gnus/gnus-util-tests.el
@@ -1,4 +1,4 @@
1;;; gnus-util-tests.el --- Selectived tests only. 1;;; gnus-util-tests.el --- Selectived tests only. -*- lexical-binding:t -*-
2;; Copyright (C) 2015-2020 Free Software Foundation, Inc. 2;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
3 3
4;; Author: Jens Lechtenbörger <jens.lechtenboerger@fsfe.org> 4;; Author: Jens Lechtenbörger <jens.lechtenboerger@fsfe.org>
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el
index 0d53c0681bf..681e51de0ed 100644
--- a/test/lisp/progmodes/js-tests.el
+++ b/test/lisp/progmodes/js-tests.el
@@ -1,4 +1,4 @@
1;;; js-tests.el --- Test suite for js-mode 1;;; js-tests.el --- Test suite for js-mode -*- 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/textmodes/bibtex-tests.el b/test/lisp/textmodes/bibtex-tests.el
index b3858de9e61..c12722fca13 100644
--- a/test/lisp/textmodes/bibtex-tests.el
+++ b/test/lisp/textmodes/bibtex-tests.el
@@ -1,4 +1,4 @@
1;;; bibtex-tests.el --- Test suite for bibtex. 1;;; bibtex-tests.el --- Test suite for bibtex. -*- 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
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index d7c7aec17c3..de0aeabfe78 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -1,4 +1,4 @@
1;;; editfns-tests.el -- tests for editfns.c 1;;; editfns-tests.el -- tests for editfns.c -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 2016-2020 Free Software Foundation, Inc. 3;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
4 4
@@ -124,8 +124,8 @@
124 "Validate character position to byte position translation." 124 "Validate character position to byte position translation."
125 (let ((bytes '())) 125 (let ((bytes '()))
126 (dotimes (pos len) 126 (dotimes (pos len)
127 (setq bytes (add-to-list 'bytes (position-bytes (1+ pos)) t))) 127 (push (position-bytes (1+ pos)) bytes))
128 bytes)) 128 (nreverse bytes)))
129 129
130(ert-deftest transpose-ascii-regions-test () 130(ert-deftest transpose-ascii-regions-test ()
131 (with-temp-buffer 131 (with-temp-buffer
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 400e9126486..b9a7d29895a 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -1,4 +1,4 @@
1;;; fns-tests.el --- tests for src/fns.c 1;;; fns-tests.el --- tests for src/fns.c -*- 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
@@ -229,8 +229,8 @@
229 (require 'info) 229 (require 'info)
230 (should (equal (func-arity 'Info-goto-node) '(1 . 3))) 230 (should (equal (func-arity 'Info-goto-node) '(1 . 3)))
231 (should (equal (func-arity (lambda (&rest x))) '(0 . many))) 231 (should (equal (func-arity (lambda (&rest x))) '(0 . many)))
232 (should (equal (func-arity (eval (lambda (x &optional y)) nil)) '(1 . 2))) 232 (should (equal (func-arity (eval '(lambda (x &optional y)) nil)) '(1 . 2)))
233 (should (equal (func-arity (eval (lambda (x &optional y)) t)) '(1 . 2))) 233 (should (equal (func-arity (eval '(lambda (x &optional y)) t)) '(1 . 2)))
234 (should (equal (func-arity 'let) '(1 . unevalled)))) 234 (should (equal (func-arity 'let) '(1 . unevalled))))
235 235
236(defun fns-tests--string-repeat (s o) 236(defun fns-tests--string-repeat (s o)