emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1be8485: Use lexical-binding in calendar tests


From: Stefan Kangas
Subject: master 1be8485: Use lexical-binding in calendar tests
Date: Mon, 27 Apr 2020 12:49:34 -0400 (EDT)

branch: master
commit 1be8485d67ef36b1d50496008be47be3050cc1bd
Author: Stefan Kangas <address@hidden>
Commit: Stefan Kangas <address@hidden>

    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.
---
 test/lisp/calendar/icalendar-tests.el  | 13 ++++++-------
 test/lisp/calendar/parse-time-tests.el |  2 +-
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/test/lisp/calendar/icalendar-tests.el 
b/test/lisp/calendar/icalendar-tests.el
index 9862552..d496878 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 4924e8b..e1801a5 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.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]