changeset 980:d10ec0f0bb6d

Tests: unbreak access_log tests in jails. It was once again broken in 257de77879e8.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 13 Jul 2016 14:08:47 +0300
parents ef6be3201851
children 516070bada7d
files access_log.t
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/access_log.t
+++ b/access_log.t
@@ -206,7 +206,10 @@ is($t->read_file('varlog_0'), "/varlog:2
 is($t->read_file('varlog_filename'), "/varlog:200\n", 'varlog good name');
 
 # binary data is escaped
+# that's "\\x7F\\x00\\x00\\x01\n" in $binary_remote_addr for "127.0.0.1"
 
-is($t->read_file('binary.log'), "\\x7F\\x00\\x00\\x01\n", 'binary');
+my $expected = join '', map { sprintf "\\x%02X", $_ } split /\./, $addr;
+
+is($t->read_file('binary.log'), "$expected\n", 'binary');
 
 ###############################################################################