]> git.eshelyaron.com Git - emacs.git/commitdiff
; * test/lisp/gnus/gnus-icalendar-tests.el: remove unneeded unwind-protect
authorRobert Pluim <rpluim@gmail.com>
Wed, 11 Sep 2024 08:00:34 +0000 (10:00 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 14 Sep 2024 20:21:32 +0000 (22:21 +0200)
(cherry picked from commit 74ea24233ca281b19c3e3d2552621ceac30dfc48)

test/lisp/gnus/gnus-icalendar-tests.el

index 72f1e660077d5a7a5650002e2608096242223d0b..9385f2ab7a6be7098ff33584d82ec7dd803e854b 100644 (file)
@@ -257,7 +257,8 @@ END:VCALENDAR" (list "participant@anoncompany.com"))))
 
 (ert-deftest gnus-icalendar-accept-with-comment ()
   ""
-  (let ((event "BEGIN:VEVENT
+  (let ((event "\
+BEGIN:VEVENT
 DTSTART;TZID=Europe/Berlin:20200915T140000
 DTEND;TZID=Europe/Berlin:20200915T143000
 RRULE:FREQ=WEEKLY;BYDAY=FR,MO,TH,TU,WE
@@ -276,23 +277,22 @@ SUMMARY:Casual coffee talk
 TRANSP:OPAQUE
 END:VEVENT")
         (icalendar-identities '("participant@anoncompany.com")))
-    (unwind-protect
-        (progn
-          (let* ((reply (with-temp-buffer
-                         (insert event)
-                         (gnus-icalendar-event-reply-from-buffer
-                          (current-buffer)
-                          'accepted
-                          icalendar-identities
-                          "Can not stay long."))))
-            (should (string-match "^ATTENDEE;.*?\\(PARTSTAT=[^;]+\\)" reply))
-            (should (string-equal (match-string 1 reply) "PARTSTAT=ACCEPTED"))
-            (should (string-match "^COMMENT:\\(.*\\)$" reply))
-            (should (string-equal (match-string 1 reply) "Can not stay long.")))))))
+    (let* ((reply (with-temp-buffer
+                    (insert event)
+                    (gnus-icalendar-event-reply-from-buffer
+                     (current-buffer)
+                     'accepted
+                     icalendar-identities
+                     "Can not stay long."))))
+      (should (string-match "^ATTENDEE;.*?\\(PARTSTAT=[^;]+\\)" reply))
+      (should (string-equal (match-string 1 reply) "PARTSTAT=ACCEPTED"))
+      (should (string-match "^COMMENT:\\(.*\\)$" reply))
+      (should (string-equal (match-string 1 reply) "Can not stay long.")))))
 
 (ert-deftest gnus-icalendar-decline-without-changing-comment ()
   ""
-  (let ((event "BEGIN:VEVENT
+  (let ((event "\
+BEGIN:VEVENT
 DTSTART;TZID=Europe/Berlin:20200915T140000
 DTEND;TZID=Europe/Berlin:20200915T143000
 RRULE:FREQ=WEEKLY;BYDAY=FR,MO,TH,TU,WE
@@ -312,20 +312,18 @@ SUMMARY:Casual coffee talk
 TRANSP:OPAQUE
 END:VEVENT")
         (icalendar-identities '("participant@anoncompany.com")))
-    (unwind-protect
-        (progn
-          (let* ((reply (with-temp-buffer
-                        (insert event)
-                        (gnus-icalendar-event-reply-from-buffer
-                         (current-buffer)
-                          'declined
-                          icalendar-identities
-                          nil))))
-            (should (string-match "^ATTENDEE;.*?\\(PARTSTAT=[^;]+\\)" reply))
-            (should (string-equal (match-string 1 reply) "PARTSTAT=DECLINED"))
-            (should (string-match "^COMMENT:\\(.*\\)$" reply))
-            (should (string-equal (match-string 1 reply) "Only available at 2pm"))
-                        )))))
+    (let* ((reply (with-temp-buffer
+                    (insert event)
+                    (gnus-icalendar-event-reply-from-buffer
+                     (current-buffer)
+                     'declined
+                     icalendar-identities
+                     nil))))
+      (should (string-match "^ATTENDEE;.*?\\(PARTSTAT=[^;]+\\)" reply))
+      (should (string-equal (match-string 1 reply) "PARTSTAT=DECLINED"))
+      (should (string-match "^COMMENT:\\(.*\\)$" reply))
+      (should (string-equal (match-string 1 reply) "Only available at 2pm"))
+      )))
 
 (provide 'gnus-icalendar-tests)
 ;;; gnus-icalendar-tests.el ends here