From: Robert Pluim Date: Wed, 11 Sep 2024 08:00:34 +0000 (+0200) Subject: ; * test/lisp/gnus/gnus-icalendar-tests.el: remove unneeded unwind-protect X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38dc6773b86bd1ed4f33f62d84e856209b09023d;p=emacs.git ; * test/lisp/gnus/gnus-icalendar-tests.el: remove unneeded unwind-protect (cherry picked from commit 74ea24233ca281b19c3e3d2552621ceac30dfc48) --- diff --git a/test/lisp/gnus/gnus-icalendar-tests.el b/test/lisp/gnus/gnus-icalendar-tests.el index 72f1e660077..9385f2ab7a6 100644 --- a/test/lisp/gnus/gnus-icalendar-tests.el +++ b/test/lisp/gnus/gnus-icalendar-tests.el @@ -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