Mercurial > hg > nginx-tests
comparison smtp.t @ 1:c731d50dd6b1
Tests: check pipelining after invalid command.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 15 Aug 2008 20:10:23 +0400 |
parents | de28d9f761be |
children | 33cb557f69d4 |
comparison
equal
deleted
inserted
replaced
0:de28d9f761be | 1:c731d50dd6b1 |
---|---|
7 ############################################################################### | 7 ############################################################################### |
8 | 8 |
9 use warnings; | 9 use warnings; |
10 use strict; | 10 use strict; |
11 | 11 |
12 use Test::More tests => 24; | 12 use Test::More tests => 25; |
13 | 13 |
14 use IO::Socket; | 14 use IO::Socket; |
15 use MIME::Base64; | 15 use MIME::Base64; |
16 | 16 |
17 use constant CRLF => "\x0D\x0A"; | 17 use constant CRLF => "\x0D\x0A"; |
52 smtp_send('EHLO example.com'); | 52 smtp_send('EHLO example.com'); |
53 smtp_check(qr/^250 /, "ehlo"); | 53 smtp_check(qr/^250 /, "ehlo"); |
54 | 54 |
55 TODO: { | 55 TODO: { |
56 local $TODO = "pipelining not implemented yet"; | 56 local $TODO = "pipelining not implemented yet"; |
57 | |
58 smtp_send('INVALID COMMAND WITH ARGUMENTS' . CRLF | |
59 . 'RSET'); | |
60 smtp_read(); | |
61 smtp_ok('rset after invalid command'); | |
57 | 62 |
58 smtp_send('AUTH PLAIN ' | 63 smtp_send('AUTH PLAIN ' |
59 . encode_base64("test\@example.com\0\0bad", '') . CRLF | 64 . encode_base64("test\@example.com\0\0bad", '') . CRLF |
60 . 'MAIL FROM:<test@example.com> SIZE=100'); | 65 . 'MAIL FROM:<test@example.com> SIZE=100'); |
61 smtp_read(); | 66 smtp_read(); |