comparison smtp.t @ 69:30d6cce3f0bd

Tests: more checks for 235 code on successful smtp auth. Wrong code was fixed in 0.7.31, so it's now safe to convert remaining checks.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 09 Feb 2009 00:43:46 +0300
parents 726c3c2a8b8c
children 4715bd4d4693
comparison
equal deleted inserted replaced
68:5f56040c39df 69:30d6cce3f0bd
92 92
93 $s->send('AUTH PLAIN ' . encode_base64("\0test\@example.com\0bad", '')); 93 $s->send('AUTH PLAIN ' . encode_base64("\0test\@example.com\0bad", ''));
94 $s->check(qr/^5.. /, 'auth plain with bad password'); 94 $s->check(qr/^5.. /, 'auth plain with bad password');
95 95
96 $s->send('AUTH PLAIN ' . encode_base64("\0test\@example.com\0secret", '')); 96 $s->send('AUTH PLAIN ' . encode_base64("\0test\@example.com\0secret", ''));
97 $s->ok('auth plain'); 97 $s->authok('auth plain');
98 98
99 # We are talking to backend from this point 99 # We are talking to backend from this point
100 100
101 $s->send('MAIL FROM:<test@example.com> SIZE=100'); 101 $s->send('MAIL FROM:<test@example.com> SIZE=100');
102 $s->ok('mail from after auth'); 102 $s->ok('mail from after auth');
120 $s->send('AUTH LOGIN'); 120 $s->send('AUTH LOGIN');
121 $s->check(qr/^334 VXNlcm5hbWU6/, 'auth login simple username challenge'); 121 $s->check(qr/^334 VXNlcm5hbWU6/, 'auth login simple username challenge');
122 $s->send(encode_base64('test@example.com', '')); 122 $s->send(encode_base64('test@example.com', ''));
123 $s->check(qr/^334 UGFzc3dvcmQ6/, 'auth login simple password challenge'); 123 $s->check(qr/^334 UGFzc3dvcmQ6/, 'auth login simple password challenge');
124 $s->send(encode_base64('secret', '')); 124 $s->send(encode_base64('secret', ''));
125 $s->ok('auth login simple'); 125 $s->authok('auth login simple');
126 126
127 # Try auth plain with username. Details: 127 # Try auth plain with username. Details:
128 # 128 #
129 # [MS-XLOGIN]: SMTP Protocol AUTH LOGIN Extension Specification 129 # [MS-XLOGIN]: SMTP Protocol AUTH LOGIN Extension Specification
130 # http://download.microsoft.com/download/5/D/D/5DD33FDF-91F5-496D-9884-0A0B0EE698BB/%5BMS-XLOGIN%5D.pdf 130 # http://download.microsoft.com/download/5/D/D/5DD33FDF-91F5-496D-9884-0A0B0EE698BB/%5BMS-XLOGIN%5D.pdf