summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2020-04-27 18:27:24 +0200
committerStefan Kangas <stefankangas@gmail.com>2020-04-27 18:27:24 +0200
commit1be8485d67ef36b1d50496008be47be3050cc1bd (patch)
treeab7c6aa990b6c1af84ef158a1c1053e136d25b83
parent08408b13faa911b586ac0c181159ada452a942cc (diff)
downloademacs-1be8485d67ef36b1d50496008be47be3050cc1bd.tar.gz
Use lexical-binding in calendar tests
* test/lisp/calendar/icalendar-tests.el: * test/lisp/calendar/parse-time-tests.el: Use lexical-binding. * test/lisp/calendar/icalendar-tests.el (icalendar--format-ical-event) (icalendar--decode-isodatetime, icalendar-tests--do-test-import) (icalendar-tests--decode-isodatetime): Silence byte-compiler.
-rw-r--r--test/lisp/calendar/icalendar-tests.el13
-rw-r--r--test/lisp/calendar/parse-time-tests.el2
2 files changed, 7 insertions, 8 deletions
diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el
index 986255250dc..d496878205b 100644
--- a/test/lisp/calendar/icalendar-tests.el
+++ b/test/lisp/calendar/icalendar-tests.el
@@ -1,4 +1,4 @@
-;; icalendar-tests.el --- Test suite for icalendar.el
+;; icalendar-tests.el --- Test suite for icalendar.el -*- lexical-binding:t -*-
;; Copyright (C) 2005, 2008-2020 Free Software Foundation, Inc.
@@ -419,11 +419,11 @@ END:VEVENT
")))
(should (string= "SUM sum DES des LOC loc ORG org"
(icalendar--format-ical-event event)))
- (setq icalendar-import-format (lambda (&rest ignore)
+ (setq icalendar-import-format (lambda (&rest _ignore)
"helloworld"))
(should (string= "helloworld" (icalendar--format-ical-event event)))
(setq icalendar-import-format
- (lambda (e)
+ (lambda (event)
(format "-%s-%s-%s-%s-%s-%s-%s-"
(icalendar--get-event-property event 'SUMMARY)
(icalendar--get-event-property event 'DESCRIPTION)
@@ -465,8 +465,7 @@ END:VEVENT
(ert-deftest icalendar--decode-isodatetime ()
"Test `icalendar--decode-isodatetime'."
- (let ((tz (getenv "TZ"))
- result)
+ (let ((tz (getenv "TZ")))
(unwind-protect
(progn
;; Use Eastern European Time (UTC+2, UTC+3 daylight saving)
@@ -886,7 +885,7 @@ During import test the timezone is set to Central European Time."
(icalendar-tests--do-test-import input expected-american)))))
(setenv "TZ" timezone))))
-(defun icalendar-tests--do-test-import (input expected-output)
+(defun icalendar-tests--do-test-import (_input expected-output)
"Actually perform import test.
Argument INPUT input icalendar string.
Argument EXPECTED-OUTPUT expected diary string."
@@ -2347,7 +2346,7 @@ END:VCALENDAR
(let ((time (icalendar--decode-isodatetime string day zone)))
(format-time-string "%FT%T%z" (encode-time time) 0)))
-(defun icalendar-tests--decode-isodatetime (ical-string)
+(defun icalendar-tests--decode-isodatetime (_ical-string)
(should (equal (icalendar-test--format "20040917T050910-0200")
"2004-09-17T03:09:10+0000"))
(should (equal (icalendar-test--format "20040917T050910")
diff --git a/test/lisp/calendar/parse-time-tests.el b/test/lisp/calendar/parse-time-tests.el
index 4924e8b072a..e1801a57307 100644
--- a/test/lisp/calendar/parse-time-tests.el
+++ b/test/lisp/calendar/parse-time-tests.el
@@ -1,4 +1,4 @@
-;; parse-time-tests.el --- Test suite for parse-time.el
+;; parse-time-tests.el --- Test suite for parse-time.el -*- lexical-binding:t -*-
;; Copyright (C) 2016-2020 Free Software Foundation, Inc.