Mercurial > hg > nginx-tests
comparison autoindex.t @ 175:b5352cabdadb
Tests: autoindex escaping fixed in 1.1.6, remove TODO.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 01 Nov 2011 20:58:45 +0300 |
parents | c0ae29632905 |
children | f9325406df0b |
comparison
equal
deleted
inserted
replaced
174:c8169c827d18 | 175:b5352cabdadb |
---|---|
87 | 87 |
88 unlike($r, qr!href="test-colon:blah"!ms, 'colon not scheme'); | 88 unlike($r, qr!href="test-colon:blah"!ms, 'colon not scheme'); |
89 like($r, qr!test-long-0{37}\.\.>!ms, 'long name'); | 89 like($r, qr!test-long-0{37}\.\.>!ms, 'long name'); |
90 | 90 |
91 like($r, qr!href="test-escape-url-%25"!ms, 'escaped url'); | 91 like($r, qr!href="test-escape-url-%25"!ms, 'escaped url'); |
92 | |
93 { | |
94 local $TODO = 'not fixed yet'; | |
95 | |
96 like($r, qr!href="test-escape-url2-%3f"!ms, 'escaped ? in url'); | 92 like($r, qr!href="test-escape-url2-%3f"!ms, 'escaped ? in url'); |
97 | |
98 } | |
99 | |
100 { | |
101 local $TODO = 'patch under review'; | |
102 | |
103 like($r, qr!test-escape-html-<>&!ms, 'escaped html'); | 93 like($r, qr!test-escape-html-<>&!ms, 'escaped html'); |
104 like($r, qr!test-long-(>){37}\.\.>!ms, 'long escaped html'); | 94 like($r, qr!test-long-(>){37}\.\.>!ms, 'long escaped html'); |
105 | |
106 } | |
107 | 95 |
108 $r = http_get('/utf8/'); | 96 $r = http_get('/utf8/'); |
109 | 97 |
110 like($r, qr!test-utf8-(\xd1\x84){3}</a>!ms, 'utf8'); | 98 like($r, qr!test-utf8-(\xd1\x84){3}</a>!ms, 'utf8'); |
111 like($r, qr!test-utf8-(\xd1\x84){37}\.\.!ms, 'utf8 long'); | 99 like($r, qr!test-utf8-(\xd1\x84){37}\.\.!ms, 'utf8 long'); |
112 | |
113 { | |
114 local $TODO = 'patch under review'; | |
115 | 100 |
116 like($r, qr!test-utf8-<>&-\xd1\x84</a>!ms, 'utf8 escaped'); | 101 like($r, qr!test-utf8-<>&-\xd1\x84</a>!ms, 'utf8 escaped'); |
117 like($r, qr!test-utf8-<>&-(\xd1\x84){33}\.\.!ms, | 102 like($r, qr!test-utf8-<>&-(\xd1\x84){33}\.\.!ms, |
118 'utf8 escaped long'); | 103 'utf8 escaped long'); |
119 like($r, qr!test-utf8-(\xd1\x84){3}-(>){33}\.\.!ms, 'utf8 long escaped'); | 104 like($r, qr!test-utf8-(\xd1\x84){3}-(>){33}\.\.!ms, 'utf8 long escaped'); |
120 | 105 |
121 like(http_get('/test-dir-escape-<>&/'), qr!test-dir-escape-<>&!ms, | 106 like(http_get('/test-dir-escape-<>&/'), qr!test-dir-escape-<>&!ms, |
122 'escaped title'); | 107 'escaped title'); |
123 | 108 |
124 } | |
125 | |
126 ############################################################################### | 109 ############################################################################### |