# HG changeset patch # User Sergey Kandaurov # Date 1497531668 -10800 # Node ID 074e05b33b1ace4accf13d430cc9d017d81922d5 # Parent 0a7d942d549b45c72bcc5ba64af0c5c2fde7520a Tests: added access_log test with long line in log_format. diff --git a/access_log.t b/access_log.t --- a/access_log.t +++ b/access_log.t @@ -21,7 +21,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http rewrite gzip/)->plan(10) +my $t = Test::Nginx->new()->has(qw/http rewrite gzip/)->plan(11) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -35,6 +35,7 @@ http { %%TEST_GLOBALS_HTTP%% log_format test "$uri:$status"; + log_format long "long line $uri:$status"; log_format binary $binary_remote_addr; server { @@ -80,6 +81,7 @@ http { location /multi { access_log %%TESTDIR%%/multi1.log test; access_log %%TESTDIR%%/multi2.log test; + access_log %%TESTDIR%%/long.log long; return 200 OK; } @@ -200,6 +202,8 @@ is($t->read_file('multi1.log'), "/multi: is($t->read_file('multi2.log'), "/multi:200\n", 'multiple logs 2'); +is($t->read_file('long.log'), "long line /multi:200\n", 'long line format'); + # test log destinations with variables is($t->read_file('varlog_0'), "/varlog:200\n", 'varlog literal zero name');