source: project/release/4/smtp/trunk/tests/run.scm @ 15891

Last change on this file since 15891 was 15891, checked in by Ivan Raikov, 10 years ago

an elaboration of the smtp test case

File size: 904 bytes
Line 
1
2(use test srfi-13)
3
4(include "tests/mta.scm")
5
6(define rfc-D.1
7  `(
8    "EHLO bar.com\r\n"
9    "MAIL FROM:<Smith@bar.com>\r\n"
10    "RCPT TO:<Jones@foo.com>\r\n"
11    "RCPT TO:<Green@foo.com>\r\n"
12    "RCPT TO:<Brown@foo.com>\r\n"
13    "DATA\r\n"
14    "Blah blah blah...\r\n...etc. etc. etc.\r\n"
15    ".\r\n"
16    "QUIT\r\n"
17    ))
18
19(test-group "chicken-mta"
20           
21(let ((output (open-output-string)))
22  (main
23   (open-input-string (string-concatenate rfc-D.1))
24   output)
25  (print "mail from: " (mailfrom))
26  (print "rcpt to: " (rcpto))
27  (print "data: " (data))
28
29  (test "rfc-D.1"
30   (string-append
31    "250-chicken-mta\r\n"
32    "250- \r\n"
33    "250-Hello \r\n"
34    "250 bar.com\r\n"
35    "250 OK\r\n"
36    "250 Accepted\r\n"
37    "250 Accepted\r\n"
38    "250 Accepted\r\n"
39    "354 Ready\r\n"
40    "250 OK\r\n"
41    "251-chicken-mta\r\n"
42    "251  closing connection\r\n")
43   (get-output-string output))
44  ))
45
Note: See TracBrowser for help on using the repository browser.