From c52f8863a536c003980c8fcc24dfb48dfb2353a8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 24 Apr 2020 15:28:22 +0200 Subject: [PATCH] Use lexical-binding in most src tests * test/src/charset-tests.el: * test/src/chartab-tests.el: * test/src/cmds-tests.el: * test/src/coding-tests.el (top-level) (generate-ascii-file, generate-mostly-nonascii-file): * test/src/doc-tests.el: * test/src/floatfns-tests.el: * test/src/font-tests.el: * test/src/keymap-tests.el: * test/src/process-tests.el (top-level) (process-test-sentinel-wait-function-working-p) (process-test-stderr-buffer, process-test-stderr-filter): * test/src/textprop-tests.el: * test/src/thread-tests.el: * test/src/timefns-tests.el: * test/src/undo-tests.el: * test/src/xml-tests.el: Use lexical-binding. --- test/src/charset-tests.el | 2 +- test/src/chartab-tests.el | 2 +- test/src/cmds-tests.el | 2 +- test/src/coding-tests.el | 10 +++++----- test/src/decompress-tests.el | 2 +- test/src/doc-tests.el | 2 +- test/src/floatfns-tests.el | 2 +- test/src/font-tests.el | 2 +- test/src/keymap-tests.el | 2 +- test/src/process-tests.el | 14 +++++++------- test/src/textprop-tests.el | 2 +- test/src/thread-tests.el | 2 +- test/src/timefns-tests.el | 2 +- test/src/undo-tests.el | 2 +- test/src/xml-tests.el | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/test/src/charset-tests.el b/test/src/charset-tests.el index 01a68c21a52..9a1d0a46f91 100644 --- a/test/src/charset-tests.el +++ b/test/src/charset-tests.el @@ -1,4 +1,4 @@ -;;; charset-tests.el --- Tests for charset.c +;;; charset-tests.el --- Tests for charset.c -*- lexical-binding: t -*- ;; Copyright 2017-2020 Free Software Foundation, Inc. diff --git a/test/src/chartab-tests.el b/test/src/chartab-tests.el index da320e33b51..0ddea2b338c 100644 --- a/test/src/chartab-tests.el +++ b/test/src/chartab-tests.el @@ -1,4 +1,4 @@ -;;; chartab-tests.el --- Tests for char-tab.c +;;; chartab-tests.el --- Tests for char-tab.c -*- lexical-binding: t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. diff --git a/test/src/cmds-tests.el b/test/src/cmds-tests.el index 8604d346109..e98e5784609 100644 --- a/test/src/cmds-tests.el +++ b/test/src/cmds-tests.el @@ -1,4 +1,4 @@ -;;; cmds-tests.el --- Testing some Emacs commands +;;; cmds-tests.el --- Testing some Emacs commands -*- lexical-binding: t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index a741e233d39..c438ae22ce3 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el @@ -1,4 +1,4 @@ -;;; coding-tests.el --- tests for text encoding and decoding +;;; coding-tests.el --- tests for text encoding and decoding -*- lexical-binding: t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. @@ -296,7 +296,7 @@ ;;; decoder, not for regression testing. (defun generate-ascii-file () - (dotimes (i 100000) + (dotimes (_i 100000) (insert-char ?a 80) (insert "\n"))) @@ -309,13 +309,13 @@ (insert "\n"))) (defun generate-mostly-nonascii-file () - (dotimes (i 30000) + (dotimes (_i 30000) (insert-char ?a 80) (insert "\n")) - (dotimes (i 20000) + (dotimes (_i 20000) (insert-char ?À 80) (insert "\n")) - (dotimes (i 10000) + (dotimes (_i 10000) (insert-char ?あ 80) (insert "\n"))) diff --git a/test/src/decompress-tests.el b/test/src/decompress-tests.el index 46fd26635c9..0a328396818 100644 --- a/test/src/decompress-tests.el +++ b/test/src/decompress-tests.el @@ -1,4 +1,4 @@ -;;; decompress-tests.el --- Test suite for decompress. +;;; decompress-tests.el --- Test suite for decompress. -*- lexical-binding: t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. diff --git a/test/src/doc-tests.el b/test/src/doc-tests.el index b6026e79c65..50cf0144b80 100644 --- a/test/src/doc-tests.el +++ b/test/src/doc-tests.el @@ -1,4 +1,4 @@ -;;; doc-tests.el --- Tests for doc.c +;;; doc-tests.el --- Tests for doc.c -*- lexical-binding: t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. diff --git a/test/src/floatfns-tests.el b/test/src/floatfns-tests.el index c1c2c8996a7..8c56674d4fd 100644 --- a/test/src/floatfns-tests.el +++ b/test/src/floatfns-tests.el @@ -1,4 +1,4 @@ -;;; floatfns-tests.el --- tests for floating point operations +;;; floatfns-tests.el --- tests for floating point operations -*- lexical-binding: t -*- ;; Copyright 2017-2020 Free Software Foundation, Inc. diff --git a/test/src/font-tests.el b/test/src/font-tests.el index 73c2846b032..cfc6f4c31b7 100644 --- a/test/src/font-tests.el +++ b/test/src/font-tests.el @@ -1,4 +1,4 @@ -;;; font-tests.el --- Test suite for font-related functions. +;;; font-tests.el --- Test suite for font-related functions. -*- lexical-binding: t -*- ;; Copyright (C) 2011-2020 Free Software Foundation, Inc. diff --git a/test/src/keymap-tests.el b/test/src/keymap-tests.el index dbf0a7d1229..75f8c0f092e 100644 --- a/test/src/keymap-tests.el +++ b/test/src/keymap-tests.el @@ -1,4 +1,4 @@ -;;; keymap-tests.el --- Test suite for src/keymap.c +;;; keymap-tests.el --- Test suite for src/keymap.c -*- lexical-binding: t -*- ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 66a76fd33b8..748afe41d2c 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -1,4 +1,4 @@ -;;; process-tests.el --- Testing the process facilities +;;; process-tests.el --- Testing the process facilities -*- lexical-binding: t -*- ;; Copyright (C) 2013-2020 Free Software Foundation, Inc. @@ -33,7 +33,7 @@ (let ((proc (start-process "test" nil "bash" "-c" "exit 20")) (sentinel-called nil) (start-time (float-time))) - (set-process-sentinel proc (lambda (proc msg) + (set-process-sentinel proc (lambda (_proc _msg) (setq sentinel-called t))) (while (not (or sentinel-called (> (- (float-time) start-time) @@ -88,7 +88,7 @@ :stderr stderr-buffer)) (sentinel-called nil) (start-time (float-time))) - (set-process-sentinel proc (lambda (proc msg) + (set-process-sentinel proc (lambda (_proc _msg) (setq sentinel-called t))) (while (not (or sentinel-called (> (- (float-time) start-time) @@ -120,13 +120,13 @@ "exit 20")) :stderr stderr-proc)) (start-time (float-time))) - (set-process-filter proc (lambda (proc input) + (set-process-filter proc (lambda (_proc input) (push input stdout-output))) - (set-process-sentinel proc (lambda (proc msg) + (set-process-sentinel proc (lambda (_proc _msg) (setq sentinel-called t))) - (set-process-filter stderr-proc (lambda (proc input) + (set-process-filter stderr-proc (lambda (_proc input) (push input stderr-output))) - (set-process-sentinel stderr-proc (lambda (proc input) + (set-process-sentinel stderr-proc (lambda (_proc _input) (setq stderr-sentinel-called t))) (while (not (or sentinel-called (> (- (float-time) start-time) diff --git a/test/src/textprop-tests.el b/test/src/textprop-tests.el index 7333444df0b..365d2c7a7b7 100644 --- a/test/src/textprop-tests.el +++ b/test/src/textprop-tests.el @@ -1,4 +1,4 @@ -;;; textprop-tests.el --- Test suite for text properties. +;;; textprop-tests.el --- Test suite for text properties. -*- lexical-binding: t -*- ;; Copyright (C) 2015-2020 Free Software Foundation, Inc. diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el index 5d85fc74e50..df34a2b66eb 100644 --- a/test/src/thread-tests.el +++ b/test/src/thread-tests.el @@ -1,4 +1,4 @@ -;;; threads.el --- tests for threads. +;;; threads.el --- tests for threads. -*- lexical-binding: t -*- ;; Copyright (C) 2012-2020 Free Software Foundation, Inc. diff --git a/test/src/timefns-tests.el b/test/src/timefns-tests.el index b24d44335e5..51dd1d1aeb5 100644 --- a/test/src/timefns-tests.el +++ b/test/src/timefns-tests.el @@ -1,4 +1,4 @@ -;;; timefns-tests.el -- tests for timefns.c +;;; timefns-tests.el -- tests for timefns.c -*- lexical-binding: t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. diff --git a/test/src/undo-tests.el b/test/src/undo-tests.el index 995e4365e12..13335a9bb10 100644 --- a/test/src/undo-tests.el +++ b/test/src/undo-tests.el @@ -1,4 +1,4 @@ -;;; undo-tests.el --- Tests of primitive-undo +;;; undo-tests.el --- Tests of primitive-undo -*- lexical-binding: t -*- ;; Copyright (C) 2012-2020 Free Software Foundation, Inc. diff --git a/test/src/xml-tests.el b/test/src/xml-tests.el index 02a52e9115d..d758c8868cf 100644 --- a/test/src/xml-tests.el +++ b/test/src/xml-tests.el @@ -1,4 +1,4 @@ -;;; libxml-parse-tests.el --- Test suite for libxml parsing. +;;; xml-tests.el --- Test suite for libxml parsing. -*- lexical-binding: t -*- ;; Copyright (C) 2014-2020 Free Software Foundation, Inc. -- 2.39.2