@@ -2257,14 +2257,14 @@ for _, flavor in ipairs({ "traditional", "traditional_compatible", "expressions"
22572257 it (" empty hosts" , function ()
22582258 use_case [1 ].route .hosts = v
22592259
2260- assert .equal (get_expression (use_case [1 ].route ), [[ (http.method == r#"GET "#) && (http.path ^= r#"/foo "#)]] )
2260+ assert .equal (get_expression (use_case [1 ].route ), [[ (http.path ^= r#"/foo "#) && (http.method == r#"GET "#)]] )
22612261 assert (new_router (use_case ))
22622262 end )
22632263
22642264 it (" empty headers" , function ()
22652265 use_case [1 ].route .headers = v
22662266
2267- assert .equal (get_expression (use_case [1 ].route ), [[ (http.method == r#"GET "#) && (http.path ^= r#"/foo "#)]] )
2267+ assert .equal (get_expression (use_case [1 ].route ), [[ (http.path ^= r#"/foo "#) && (http.method == r#"GET "#)]] )
22682268 assert (new_router (use_case ))
22692269 end )
22702270
@@ -2278,7 +2278,7 @@ for _, flavor in ipairs({ "traditional", "traditional_compatible", "expressions"
22782278 it (" empty snis" , function ()
22792279 use_case [1 ].route .snis = v
22802280
2281- assert .equal (get_expression (use_case [1 ].route ), [[ (http.method == r#"GET "#) && (http.path ^= r#"/foo "#)]] )
2281+ assert .equal (get_expression (use_case [1 ].route ), [[ (http.path ^= r#"/foo "#) && (http.method == r#"GET "#)]] )
22822282 assert (new_router (use_case ))
22832283 end )
22842284 end
@@ -2302,15 +2302,15 @@ for _, flavor in ipairs({ "traditional", "traditional_compatible", "expressions"
23022302 it (" path has '\" '" , function ()
23032303 use_case [1 ].route .paths = { [[ ~/\"/*$]] , }
23042304
2305- assert .equal ([[ (http.method == r#"GET" #) && (http.path ~ r#"^/\"/*$ "#)]] ,
2305+ assert .equal ([[ (http.path ~ r#"^/\"/*$" #) && (http.method == r#"GET "#)]] ,
23062306 get_expression (use_case [1 ].route ))
23072307 assert (new_router (use_case ))
23082308 end )
23092309
23102310 it (" path has '\" #'" , function ()
23112311 use_case [1 ].route .paths = { [[ ~/\"#/*$]] , }
23122312
2313- assert .equal ([[ (http.method == r#"GET"# ) && (http.path ~ "^/\\\"#/*$" )]] ,
2313+ assert .equal ([[ (http.path ~ "^/\\\"#/*$" ) && (http.method == r#"GET"# )]] ,
23142314 get_expression (use_case [1 ].route ))
23152315 assert (new_router (use_case ))
23162316 end )
@@ -2334,15 +2334,15 @@ for _, flavor in ipairs({ "traditional", "traditional_compatible", "expressions"
23342334 it (" regex path has double '\\ '" , function ()
23352335 use_case [1 ].route .paths = { [[ ~/\\/*$]] , }
23362336
2337- assert .equal ([[ (http.method == r#"GET "#) && (http.path ~ r#"^/\\/*$ "#)]] ,
2337+ assert .equal ([[ (http.path ~ r#"^/\\/*$ "#) && (http.method == r#"GET "#)]] ,
23382338 get_expression (use_case [1 ].route ))
23392339 assert (new_router (use_case ))
23402340 end )
23412341
23422342 it (" regex path has '\\ d'" , function ()
23432343 use_case [1 ].route .paths = { [[ ~/\d+]] , }
23442344
2345- assert .equal ([[ (http.method == r#"GET "#) && (http.path ~ r#"^/\d+ "#)]] ,
2345+ assert .equal ([[ (http.path ~ r#"^/\d+ "#) && (http.method == r#"GET "#)]] ,
23462346 get_expression (use_case [1 ].route ))
23472347 assert (new_router (use_case ))
23482348 end )
@@ -2366,7 +2366,7 @@ for _, flavor in ipairs({ "traditional", "traditional_compatible", "expressions"
23662366 use_case [1 ].route .methods = { " GET" }
23672367 use_case [1 ].route .headers = { test = { " ~*Quote" }, }
23682368
2369- assert .equal ([[ (http.method == r#"GET "#) && (any(lower( http.headers.test)) ~ r#"quote "#)]] ,
2369+ assert .equal ([[ (any(lower( http.headers.test)) ~ r#"quote "#) && (http.method == r#"GET "#)]] ,
23702370 get_expression (use_case [1 ].route ))
23712371 assert (new_router (use_case ))
23722372 end )
0 commit comments