File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,27 @@ def test_loading_latin1_file(self):
247247 # todo perform some tests on result file
248248 tmp_file .unlink ()
249249
250+ def test_issue_15 (self ):
251+ self ._check_formatting (
252+ 'section { server_name "~^(?<tag>[0-9a-f]{8}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{12})\.a\.b\.com$"; }' ,
253+ 'section {\n server_name "~^(?<tag>[0-9a-f]{8}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{12})\.a\.b\.com$";\n }\n ' )
254+
255+ def test_issue_11 (self ):
256+ self ._check_formatting (" # 3 spaces\n " +
257+ "# 2 spaces\n " +
258+ " # 1 space" ,
259+ "# 3 spaces\n " +
260+ "# 2 spaces\n " +
261+ "# 1 space\n " )
262+
263+ # everything after # is left as is (except trimming trailing whitespaces)
264+ self ._check_formatting (""" #if (!-f $request_filename) {
265+ # rewrite ^/static/?(.*)$ /static.php?resource=$1 last;
266+ #""" ,
267+ "#if (!-f $request_filename) {\n " +
268+ "# rewrite ^/static/?(.*)$ /static.php?resource=$1 last;\n " +
269+ "#\n " )
270+
250271
251272if __name__ == '__main__' :
252273 unittest .main ()
You can’t perform that action at this time.
0 commit comments