-;;; emacsclient-tests.el --- Test emacsclient
+;;; emacsclient-tests.el --- Test emacsclient -*- lexical-binding:t -*-
;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
-;;; hierarchy-tests.el --- Tests for hierarchy.el
+;;; hierarchy-tests.el --- Tests for hierarchy.el -*- lexical-binding:t -*-
;; Copyright (C) 2017-2019 Damien Cassou
'(dove pigeon dolphin cow)))))
(ert-deftest hierarchy-leafs-includes-lonely-roots ()
- (let ((parentfn (lambda (item) nil))
+ (let ((parentfn (lambda (_) nil))
(hierarchy (hierarchy-new)))
(hierarchy-add-tree hierarchy 'foo parentfn)
(should (equal (hierarchy-leafs hierarchy)
-;;; tests/eshell-tests.el --- Eshell test suite
+;;; tests/eshell-tests.el --- Eshell test suite -*- lexical-binding:t -*-
;; Copyright (C) 1999-2020 Free Software Foundation, Inc.
(eshell-insert-command text func)
(eshell-match-result regexp))
+(defvar eshell-history-file-name)
+
(defun eshell-test-command-result (command)
"Like `eshell-command-result', but not using HOME."
(let ((eshell-directory-name (make-temp-file "eshell" t))
-;;; gnus-util-tests.el --- Selectived tests only.
+;;; gnus-util-tests.el --- Selectived tests only. -*- lexical-binding:t -*-
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.
;; Author: Jens Lechtenbörger <jens.lechtenboerger@fsfe.org>
-;;; js-tests.el --- Test suite for js-mode
+;;; js-tests.el --- Test suite for js-mode -*- lexical-binding:t -*-
;; Copyright (C) 2017-2020 Free Software Foundation, Inc.
-;;; bibtex-tests.el --- Test suite for bibtex.
+;;; bibtex-tests.el --- Test suite for bibtex. -*- lexical-binding:t -*-
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
-;;; 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.
"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
-;;; 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.
(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)