# HG changeset patch # User Sergey Kandaurov # Date 1463152784 -10800 # Node ID 16b5438e3da47ecb312b94f7a6b530f2a9f30439 # Parent 6bb1f2ccd38657992deea95ef04f4706e246a1b5 Tests: added map test with matching hash key. diff --git a/map.t b/map.t --- a/map.t +++ b/map.t @@ -23,7 +23,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http map rewrite/)->plan(18); +my $t = Test::Nginx->new()->has(qw/http map rewrite/)->plan(19); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -40,6 +40,7 @@ http { map $args $x { default 0; foo bar; + foo2 bar; } map $args $y { @@ -86,6 +87,7 @@ EOF like(http_get('/?1'), qr/x:0 y:0/, 'map default'); like(http_get('/?foo'), qr/x:bar y:0/, 'map foo bar'); +like(http_get('/?foo2'), qr/x:bar y:0/, 'map foo bar key'); like(http_get('/?example.com'), qr/x:0 y:foo/, 'map example.com foo'); like(http_get('/?EXAMPLE.COM'), qr/x:0 y:foo/, 'map EXAMPLE.COM foo'); like(http_get('/?example.com.'), qr/x:0 y:foo/, 'map example.com. foo');