From bb93ee6601ac6ca5fb6ff0e9d4d1cfcbb73e7f58 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 30 Sep 2015 21:00:26 +0000 Subject: t/nntpd.t: simplify condition for response termination Multiline responses must end with "\r\n.\r\n", so we won't break out early in case the OS doesn't support MSG_MORE. --- t/nntpd.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/nntpd.t b/t/nntpd.t index e4c0244d..8a721e20 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -130,7 +130,7 @@ EOF syswrite($s, "HDR $k $mid\r\n"); do { sysread($s, $buf, 4096, length($buf)); - } until ($buf =~ /^[^2]../ || $buf =~ /\r\n\.\r\n\z/); + } until ($buf =~ /\r\n\.\r\n\z/); my @r = split("\r\n", $buf); like($r[0], qr/\A224 /, '224 response for HDR'); is($r[1], "0 $v", 'got expected response for HDR'); @@ -167,7 +167,7 @@ EOF $buf = ''; do { sysread($s, $buf, 4096, length($buf)); - } until ($buf =~ /^[^2]../ || $buf =~ /\r\n\.\r\n\z/); + } until ($buf =~ /\r\n\.\r\n\z/); my @r = split("\r\n", $buf); like($r[0], qr/^224 /, 'got 224 response for OVER'); is($r[1], "0\thihi\tMe \t" . -- cgit v1.2.3-24-ge0c7