Skip to content

Commit 882a76a

Browse files
committed
Removes some superfluous begins in sendmail suite
1 parent c7422a6 commit 882a76a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

rosetta-test-suites/sendmail.ros

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@
188188
("502 SYNTAX ERROR")
189189
("530 AUTH ERROR")
190190
("520 FATAL ERROR"))
191-
(lambda (response-code) (begin
191+
(lambda (response-code)
192192
(server-set-response-code! server response-code)
193193
(let
194194
((responses
195195
(sendmail-send-message smtp-connection "failure content" "sender@sender.to" '("user@recipient.to"))))
196-
(assert (all? send-error? responses) (string-append "Expected client to fail when server responds with error:" response-code))))))
196+
(assert (all? send-error? responses) (string-append "Expected client to fail when server responds with error:" response-code)))))
197197

198198
(capability 'handle-421 (list
199199
; As send-message handles multiple commands and responses, it also needs to deal with responses that
@@ -348,46 +348,46 @@
348348

349349
(data-test "CRLF detection in send-message sender"
350350
'(("foo\r\nbar@email.com") ("foo\nbar@email.com") ("foo\rbar@email.com"))
351-
(lambda (sender-string) (begin
351+
(lambda (sender-string)
352352
(let
353353
((responses (sendmail-send-message smtp-connection "message content" sender-string '("user@recipient.to"))))
354354
(display responses)
355-
(assert (all? send-error? responses) (string-append "Expected client to fail when CR or LF is in sender of send-message: " sender-string))))))
355+
(assert (all? send-error? responses) (string-append "Expected client to fail when CR or LF is in sender of send-message: " sender-string)))))
356356

357357
(data-test "CRLF detection in send-message recipient"
358358
'(("foo\r\nbar@email.com") ("foo\nbar@email.com") ("foo\rbar@email.com"))
359-
(lambda (recipient-string) (begin
359+
(lambda (recipient-string)
360360
(let
361361
((responses (sendmail-send-message smtp-connection "message content" "sender@email.com" (list recipient-string))))
362-
(assert (all? send-error? responses) (string-append "Expected client to fail when CR or LF is in recipient of send-message: " recipient-string))))))
362+
(assert (all? send-error? responses) (string-append "Expected client to fail when CR or LF is in recipient of send-message: " recipient-string)))))
363363

364364
))
365365

366366
(capability 'mitigation (list
367367

368368
(data-test "CRLF mitigation in send-message sender"
369369
'(("foo\r\nbar@email.com" "\r\n") ("foo\nbar@email.com" "\n") ("foo\rbar@email.com" "\r"))
370-
(lambda (sender-string injection) (begin
370+
(lambda (sender-string injection)
371371
(let
372372
((responses (sendmail-send-message smtp-connection "message content" sender-string '("user@recipient.to"))))
373373
(assert (all? send-success? responses))
374374
(assert
375375
(all?
376376
(lambda (c) (not (string-index c injection)))
377377
(server-requests-with-command server "MAIL"))
378-
(string-append "Expected client to remove CR or LF or both from sender of send-message: " sender-string))))))
378+
(string-append "Expected client to remove CR or LF or both from sender of send-message: " sender-string)))))
379379

380380
(data-test "CRLF mitigation in send-message recipient"
381381
'(("foo\r\nbar@email.com" "\r\n") ("foo\nbar@email.com" "\n") ("foo\rbar@email.com" "\r"))
382-
(lambda (recipient-string injection) (begin
382+
(lambda (recipient-string injection)
383383
(let
384384
((responses (sendmail-send-message smtp-connection "message content" "sender@email.com" (list recipient-string))))
385385
(assert (all? send-success? responses))
386386
(assert
387387
(all?
388388
(lambda (c) (not (string-index c injection)))
389389
(server-requests-with-command server "RCPT"))
390-
(string-append "Expected client to remove CR or LF or both from recipients of send-message: " recipient-string))))))
390+
(string-append "Expected client to remove CR or LF or both from recipients of send-message: " recipient-string)))))
391391
))
392392

393393
))

0 commit comments

Comments
 (0)