# HG changeset patch # User Sergey Kandaurov # Date 1490107117 -10800 # Node ID 57673c7257a3eec84f7d010c3125ab6072cbb22c # Parent ccf134a800aea3c35befd8431365be4715e254ab Tests: unbreak mail tests in case of EOF. diff --git a/mail_capability.t b/mail_capability.t --- a/mail_capability.t +++ b/mail_capability.t @@ -234,7 +234,8 @@ sub get_auth_caps { my ($s) = @_; my @meth; - while ($s->read() !~ qr/^\./) { + while ($s->read()) { + last if /^\./; push @meth, $1 if /(.*?)\x0d\x0a?/ms; } join ':', @meth; diff --git a/mail_pop3.t b/mail_pop3.t --- a/mail_pop3.t +++ b/mail_pop3.t @@ -207,7 +207,8 @@ sub get_auth_caps { my ($s) = @_; my @meth; - while ($s->read() !~ qr/^\./) { + while ($s->read()) { + last if /^\./; push @meth, $1 if /(.*?)\x0d\x0a?/ms; } join ':', @meth;