diff options
| author | Stefan Kangas | 2020-04-28 16:33:08 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2020-04-28 18:14:24 +0200 |
| commit | a0ee542d9e3ed345f62a5305cb966efebd70886e (patch) | |
| tree | 035ee960670e0b39fdc6a7b7bdc4edc73d918c34 | |
| parent | 13f64b052f5104e143ec1c14f47a0738c26f5766 (diff) | |
| download | emacs-a0ee542d9e3ed345f62a5305cb966efebd70886e.tar.gz emacs-a0ee542d9e3ed345f62a5305cb966efebd70886e.zip | |
Use lexical-binding in many emacs-lisp tests
* test/lisp/emacs-lisp/bytecomp-tests.el:
* test/lisp/emacs-lisp/ert-x-tests.el:
* test/lisp/emacs-lisp/nadvice-tests.el:
* test/lisp/emacs-lisp/pcase-tests.el:
* test/lisp/emacs-lisp/seq-tests.el:
* test/lisp/emacs-lisp/subr-x-tests.el:
* test/lisp/emacs-lisp/text-property-search-tests.el: Use
lexical-binding.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-filter)
(test-seq-remove, test-seq-count, test-seq-every-p): Silence
byte-compiler.
| -rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/ert-x-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/nadvice-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/pcase-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/seq-tests.el | 10 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/subr-x-tests.el | 2 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/text-property-search-tests.el | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index d4ceb47c36e..bfe2d06a61b 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; bytecomp-tests.el | 1 | ;;; bytecomp-tests.el -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2008-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2008-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/ert-x-tests.el b/test/lisp/emacs-lisp/ert-x-tests.el index e910329c201..b760f8c7869 100644 --- a/test/lisp/emacs-lisp/ert-x-tests.el +++ b/test/lisp/emacs-lisp/ert-x-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; ert-x-tests.el --- Tests for ert-x.el | 1 | ;;; ert-x-tests.el --- Tests for ert-x.el -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/nadvice-tests.el b/test/lisp/emacs-lisp/nadvice-tests.el index eabe3cb1970..a955df0a696 100644 --- a/test/lisp/emacs-lisp/nadvice-tests.el +++ b/test/lisp/emacs-lisp/nadvice-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; advice-tests.el --- Test suite for the new advice thingy. | 1 | ;;; nadvice-tests.el --- Test suite for the new advice thingy. -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2012-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2012-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/pcase-tests.el b/test/lisp/emacs-lisp/pcase-tests.el index 0b69bd99f32..ac512416b71 100644 --- a/test/lisp/emacs-lisp/pcase-tests.el +++ b/test/lisp/emacs-lisp/pcase-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; pcase-tests.el --- Test suite for pcase macro. | 1 | ;;; pcase-tests.el --- Test suite for pcase macro. -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2012-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2012-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/test/lisp/emacs-lisp/seq-tests.el b/test/lisp/emacs-lisp/seq-tests.el index 77ee4f5c38d..a6a80952360 100644 --- a/test/lisp/emacs-lisp/seq-tests.el +++ b/test/lisp/emacs-lisp/seq-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; seq-tests.el --- Tests for sequences.el | 1 | ;;; seq-tests.el --- Tests for seq.el -*- 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 | ||
| @@ -126,7 +126,7 @@ Evaluate BODY for each created sequence. | |||
| 126 | (with-test-sequences (seq '(6 7 8 9 10)) | 126 | (with-test-sequences (seq '(6 7 8 9 10)) |
| 127 | (should (equal (seq-filter #'test-sequences-evenp seq) '(6 8 10))) | 127 | (should (equal (seq-filter #'test-sequences-evenp seq) '(6 8 10))) |
| 128 | (should (equal (seq-filter #'test-sequences-oddp seq) '(7 9))) | 128 | (should (equal (seq-filter #'test-sequences-oddp seq) '(7 9))) |
| 129 | (should (equal (seq-filter (lambda (elt) nil) seq) '()))) | 129 | (should (equal (seq-filter (lambda (_) nil) seq) '()))) |
| 130 | (with-test-sequences (seq '()) | 130 | (with-test-sequences (seq '()) |
| 131 | (should (equal (seq-filter #'test-sequences-evenp seq) '())))) | 131 | (should (equal (seq-filter #'test-sequences-evenp seq) '())))) |
| 132 | 132 | ||
| @@ -134,7 +134,7 @@ Evaluate BODY for each created sequence. | |||
| 134 | (with-test-sequences (seq '(6 7 8 9 10)) | 134 | (with-test-sequences (seq '(6 7 8 9 10)) |
| 135 | (should (equal (seq-remove #'test-sequences-evenp seq) '(7 9))) | 135 | (should (equal (seq-remove #'test-sequences-evenp seq) '(7 9))) |
| 136 | (should (equal (seq-remove #'test-sequences-oddp seq) '(6 8 10))) | 136 | (should (equal (seq-remove #'test-sequences-oddp seq) '(6 8 10))) |
| 137 | (should (same-contents-p (seq-remove (lambda (elt) nil) seq) seq))) | 137 | (should (same-contents-p (seq-remove (lambda (_) nil) seq) seq))) |
| 138 | (with-test-sequences (seq '()) | 138 | (with-test-sequences (seq '()) |
| 139 | (should (equal (seq-remove #'test-sequences-evenp seq) '())))) | 139 | (should (equal (seq-remove #'test-sequences-evenp seq) '())))) |
| 140 | 140 | ||
| @@ -142,7 +142,7 @@ Evaluate BODY for each created sequence. | |||
| 142 | (with-test-sequences (seq '(6 7 8 9 10)) | 142 | (with-test-sequences (seq '(6 7 8 9 10)) |
| 143 | (should (equal (seq-count #'test-sequences-evenp seq) 3)) | 143 | (should (equal (seq-count #'test-sequences-evenp seq) 3)) |
| 144 | (should (equal (seq-count #'test-sequences-oddp seq) 2)) | 144 | (should (equal (seq-count #'test-sequences-oddp seq) 2)) |
| 145 | (should (equal (seq-count (lambda (elt) nil) seq) 0))) | 145 | (should (equal (seq-count (lambda (_) nil) seq) 0))) |
| 146 | (with-test-sequences (seq '()) | 146 | (with-test-sequences (seq '()) |
| 147 | (should (equal (seq-count #'test-sequences-evenp seq) 0)))) | 147 | (should (equal (seq-count #'test-sequences-evenp seq) 0)))) |
| 148 | 148 | ||
| @@ -199,7 +199,7 @@ Evaluate BODY for each created sequence. | |||
| 199 | 199 | ||
| 200 | (ert-deftest test-seq-every-p () | 200 | (ert-deftest test-seq-every-p () |
| 201 | (with-test-sequences (seq '(43 54 22 1)) | 201 | (with-test-sequences (seq '(43 54 22 1)) |
| 202 | (should (seq-every-p (lambda (elt) t) seq)) | 202 | (should (seq-every-p (lambda (_) t) seq)) |
| 203 | (should-not (seq-every-p #'test-sequences-oddp seq)) | 203 | (should-not (seq-every-p #'test-sequences-oddp seq)) |
| 204 | (should-not (seq-every-p #'test-sequences-evenp seq))) | 204 | (should-not (seq-every-p #'test-sequences-evenp seq))) |
| 205 | (with-test-sequences (seq '(42 54 22 2)) | 205 | (with-test-sequences (seq '(42 54 22 2)) |
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el index 220ce0c08f0..c702fdff6f1 100644 --- a/test/lisp/emacs-lisp/subr-x-tests.el +++ b/test/lisp/emacs-lisp/subr-x-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; subr-x-tests.el --- Testing the extended lisp routines | 1 | ;;; subr-x-tests.el --- Testing the extended lisp routines -*- 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/text-property-search-tests.el b/test/lisp/emacs-lisp/text-property-search-tests.el index 26b89b72312..549c90d20d8 100644 --- a/test/lisp/emacs-lisp/text-property-search-tests.el +++ b/test/lisp/emacs-lisp/text-property-search-tests.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; text-property-search-tests.el --- Testing text-property-search | 1 | ;;; text-property-search-tests.el --- Testing text-property-search -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2018-2020 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2018-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||