diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2020-08-29 20:55:46 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2020-08-29 22:41:51 +0200 |
commit | 2aeff0794a2b2b86ffe4325a8c677ebbfb2afa1f (patch) | |
tree | cb728d6209697b76f62084e82c7f92019e375743 /test/src | |
parent | e709c187fde76573ea3ec3a5f14e09b9ed59525f (diff) | |
download | emacs-2aeff0794a2b2b86ffe4325a8c677ebbfb2afa1f.tar.gz emacs-2aeff0794a2b2b86ffe4325a8c677ebbfb2afa1f.tar.bz2 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/src')
-rw-r--r-- | test/src/editfns-tests.el | 6 | ||||
-rw-r--r-- | test/src/fns-tests.el | 6 |
2 files changed, 6 insertions, 6 deletions
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 @@ -;;; editfns-tests.el -- tests for editfns.c +;;; editfns-tests.el -- tests for editfns.c -*- lexical-binding:t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. @@ -124,8 +124,8 @@ "Validate character position to byte position translation." (let ((bytes '())) (dotimes (pos len) - (setq bytes (add-to-list 'bytes (position-bytes (1+ pos)) t))) - bytes)) + (push (position-bytes (1+ pos)) bytes)) + (nreverse bytes))) (ert-deftest transpose-ascii-regions-test () (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 @@ -;;; fns-tests.el --- tests for src/fns.c +;;; fns-tests.el --- tests for src/fns.c -*- lexical-binding:t -*- ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. @@ -229,8 +229,8 @@ (require 'info) (should (equal (func-arity 'Info-goto-node) '(1 . 3))) (should (equal (func-arity (lambda (&rest x))) '(0 . many))) - (should (equal (func-arity (eval (lambda (x &optional y)) nil)) '(1 . 2))) - (should (equal (func-arity (eval (lambda (x &optional y)) t)) '(1 . 2))) + (should (equal (func-arity (eval '(lambda (x &optional y)) nil)) '(1 . 2))) + (should (equal (func-arity (eval '(lambda (x &optional y)) t)) '(1 . 2))) (should (equal (func-arity 'let) '(1 . unevalled)))) (defun fns-tests--string-repeat (s o) |