# HG changeset patch # User Maxim Dounin # Date 1265279674 -10800 # Node ID 0a2f750790c9e6b425f1fe8fa500cdda0691c097 # Parent f10f077a31740a9226b1fdbf439ab263ea8e7309 Tests: add autoindex test for '?' in file name. Reported by: Konstantin Leonov diff --git a/autoindex.t b/autoindex.t --- a/autoindex.t +++ b/autoindex.t @@ -21,7 +21,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http autoindex/)->plan(15) +my $t = Test::Nginx->new()->has(qw/http autoindex/)->plan(16) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -63,6 +63,7 @@ symlink("$d/test-file", "$d/test-file-li $t->write_file('test-long-' . ('0' x 50), ''); $t->write_file('test-long-' . ('>' x 50), ''); $t->write_file('test-escape-url-%', ''); +$t->write_file('test-escape-url2-?', ''); $t->write_file('test-escape-html-<>&', ''); mkdir($d . '/utf8'); @@ -91,6 +92,13 @@ like($r, qr!test-long-0{37}\.\.>!ms, like($r, qr!href="test-escape-url-%25"!ms, 'escaped url'); { +local $TODO = 'not fixed yet'; + +like($r, qr!href="test-escape-url2-%3f"!ms, 'escaped ? in url'); + +} + +{ local $TODO = 'patch under review'; like($r, qr!test-escape-html-<>&!ms, 'escaped html');