changeset 1681:ac26f7f2b187

Tests: test for split commands with SMTP pipelining.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 19 May 2021 04:33:03 +0300
parents e6bf510f5e13
children 57ff83315818
files mail_smtp.t
diffstat 1 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mail_smtp.t
+++ b/mail_smtp.t
@@ -98,7 +98,7 @@ http {
 EOF
 
 $t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon);
-$t->run()->plan(36);
+$t->run()->plan(39);
 
 $t->waitforsocket('127.0.0.1:' . port(8026));
 
@@ -248,6 +248,29 @@ my $s = Test::Nginx::SMTP->new();
 $s->ok('pipelined rcpt to');
 $s->ok('pipelined rset');
 
+# Pipelining with split command
+
+$s = Test::Nginx::SMTP->new();
+$s->read();
+$s->send('EHLO example.com');
+$s->read();
+
+$s->print('MAIL FROM:<test@example.com> SIZE=100' . CRLF
+	. 'RCPT TO:<test@example.com>' . CRLF
+	. 'RS');
+
+$s->ok('split pipelined mail from');
+
+TODO: {
+local $TODO = 'not yet' unless $t->has_version('1.21.0');
+
+$s->ok('split pipelined rcpt to');
+
+}
+
+$s->send('ET');
+$s->ok('split pipelined rset');
+
 # Pipelining longer than smtp_client_buffer
 
 $s = Test::Nginx::SMTP->new(PeerAddr => '127.0.0.1:' . port(8027));