diff --git a/split_clients.t b/split_clients.t old mode 100644 new mode 100755 index 7666e1c0..25c79533 --- a/split_clients.t +++ b/split_clients.t @@ -22,7 +22,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http split_clients/)->plan(1); +my $t = Test::Nginx->new()->has(qw/http split_clients/)->plan(2); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -42,6 +42,10 @@ http { * ".three"; } + split_clients $uri $utf8_variant { + * "utf8"; + } + server { listen 127.0.0.1:8080; server_name localhost; @@ -49,6 +53,10 @@ http { location / { index index${variant}.html; } + + location /a { + return 200 $utf8_variant; + } } } @@ -65,6 +73,7 @@ $t->run(); # NB: split_clients distribution is a subject to implementation details like(many('/', 20), qr/first: 12, second: 2, third: 6/, 'split'); +like(http_get("/a\xC3\xA9"), qr/utf8/, 'utf8 key'); ###############################################################################