Mercurial > hg > nginx-tests
comparison lib/Test/Nginx/IMAP.pm @ 1684:e7f0b4ca0a1a
Tests: literals support in IMAP test backend.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 19 May 2021 04:33:09 +0300 |
parents | d0025a0dead7 |
children | 5d3aee48ed8e |
comparison
equal
deleted
inserted
replaced
1683:994d1b58cbe8 | 1684:e7f0b4ca0a1a |
---|---|
123 while (my $client = $server->accept()) { | 123 while (my $client = $server->accept()) { |
124 $client->autoflush(1); | 124 $client->autoflush(1); |
125 print $client "* OK fake imap server ready" . CRLF; | 125 print $client "* OK fake imap server ready" . CRLF; |
126 | 126 |
127 while (<$client>) { | 127 while (<$client>) { |
128 Test::Nginx::log_core('||', $_); | |
129 | |
130 while (m/{(\d+)}\x0d?$/) { | |
131 print $client '+ ' . CRLF; | |
132 $client->sysread(my $buf, $1); | |
133 Test::Nginx::log_core('||', $buf); | |
134 $buf = <$client>; | |
135 Test::Nginx::log_core('||', $buf); | |
136 $_ .= $buf; | |
137 } | |
138 | |
128 my $tag = ''; | 139 my $tag = ''; |
129 | 140 |
130 $tag = $1 if m/^(\S+)/; | 141 $tag = $1 if m/^(\S+)/; |
131 s/^(\S+)\s+//; | 142 s/^(\S+)\s+//; |
132 | 143 |