[PATCH 1 of 3] Tests: style
Sergey Kandaurov
pluknet at nginx.com
Mon Mar 20 15:35:50 UTC 2023
> On 10 Mar 2023, at 09:00, Maxim Dounin <mdounin at mdounin.ru> wrote:
>
> # HG changeset patch
> # User Maxim Dounin <mdounin at mdounin.ru>
> # Date 1678424069 -10800
> # Fri Mar 10 07:54:29 2023 +0300
> # Node ID fdebeebd07b160f1d30e18d56e64dfb08570f8b1
> # Parent 1e1d0f3874b0c5b1e399ec76b0198b5c9c265a36
> Tests: style.
>
> diff --git a/lib/Test/Nginx/IMAP.pm b/lib/Test/Nginx/IMAP.pm
> --- a/lib/Test/Nginx/IMAP.pm
> +++ b/lib/Test/Nginx/IMAP.pm
> @@ -66,9 +66,9 @@ sub getline {
> }
>
> while (IO::Select->new($socket)->can_read(8)) {
> - $socket->blocking(0);
> + $socket->blocking(0);
> my $n = $socket->sysread(my $buf, 1024);
> - $socket->blocking(1);
> + $socket->blocking(1);
> last unless $n;
>
> $self->{_read_buffer} .= $buf;
> diff --git a/lib/Test/Nginx/Stream.pm b/lib/Test/Nginx/Stream.pm
> --- a/lib/Test/Nginx/Stream.pm
> +++ b/lib/Test/Nginx/Stream.pm
> @@ -86,7 +86,7 @@ sub read {
> $s->blocking(0);
> if (IO::Select->new($s)->can_read($extra{read_timeout} || 8)) {
> $s->sysread($buf, 1024);
> - };
> + }
>
> log_in($buf);
> return $buf;
Looks good.
For the record, there are similar (unrelated) style bugs,
conveniently found with grep -n '\t ' *.t
auth_basic.t:56: }
js_fetch.t:689: print $client "0" . CRLF . CRLF;
slice.t:117: }
--
Sergey Kandaurov
More information about the nginx-devel
mailing list