Mercurial > hg > nginx-tests
changeset 1188:074e05b33b1a
Tests: added access_log test with long line in log_format.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 15 Jun 2017 16:01:08 +0300 |
parents | 0a7d942d549b |
children | 1c703303feee |
files | access_log.t |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/access_log.t Wed Jun 14 12:38:45 2017 +0300 +++ b/access_log.t Thu Jun 15 16:01:08 2017 +0300 @@ -21,7 +21,7 @@ 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 @@ %%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 @@ 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('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');