route-test: trim verbose inline comments to match test style
ober
d9f0c559f4b3102b4f4e81bbf9914784e25f9d87
--- a/sinatra/route-test.ss +++ b/sinatra/route-test.ss @@ -94,8 +94,8 @@ (test-case "compiled re-object is ReDoS-safe on hostile path" ;; DSL patterns compile to a (std regex) re-object served by the linear - ;; native engine. A pattern that would catastrophically backtrack under - ;; pregexp must complete quickly here. + ;; native engine; a pattern that would catastrophically backtrack under + ;; pregexp must complete quickly. (let ((rx (re "^(([a-z])+)+!"))) (let-values (((m ns) (elapsed-nanos (lambda () @@ -107,7 +107,6 @@ (test-case "raw pregexp route is step-bounded against hostile path" ;; User-supplied raw pregexp patterns cannot use the linear engine, so ;; route-pattern-captures bounds backtracking via *pregexp-max-steps*. - ;; A catastrophic pattern must fail fast (returning #f) rather than hang. (let ((rx (pregexp "^(([a-z])+)+!"))) (let-values (((m ns) (elapsed-nanos (lambda () @@ -117,9 +116,6 @@ (check (< ns 100000000) => #t)))) (test-case "DSL splat route stays linear on long hostile path" - ;; A simple DSL pattern under a long non-matching tail must remain - ;; linear-time. Under backtracking pregexp a (.+?) splat with no - ;; terminator could blow up; the linear path handles it in O(n). (let-values (((rx _names) (compile-route-pattern "/files/*"))) (let-values (((m ns) (elapsed-nanos (lambda () @@ -128,7 +124,7 @@ (check m ? list?) (check (< ns 100000000) => #t)))) - (test-case "linear matcher still rejects non-matching DSL route quickly" + (test-case "linear matcher rejects non-matching DSL route quickly" (let-values (((rx _names) (compile-route-pattern "/users/:id"))) (let-values (((m ns) (elapsed-nanos (lambda ()