changeset 126:0a2f750790c9

Tests: add autoindex test for '?' in file name. Reported by: Konstantin Leonov
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 04 Feb 2010 13:34:34 +0300
parents f10f077a3174
children 2bf0c4c80aa7
files autoindex.t
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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}\.\.&gt;!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-&lt;&gt;&amp;!ms, 'escaped html');