diff options
Diffstat (limited to 'tests/test/server.scm')
-rw-r--r-- | tests/test/server.scm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/test/server.scm b/tests/test/server.scm index 43b60769..a6200cb8 100644 --- a/tests/test/server.scm +++ b/tests/test/server.scm @@ -13,12 +13,16 @@ (parse-endpoint-string "/static/:dir/:file")) ;; Checks that parsing produces correct results -(let ((path args (parse-endpoint-string "/static/:dir/:file"))) - (test-equal "/static/([^/.]+)/([^/.]+)" path) - (test-equal '(dir file) args)) +(test-group + "Simple parameters" + (let ((path args (parse-endpoint-string "/static/:dir/:file"))) + (test-equal "Path" "/static/([^/.]+)/([^/.]+)" path) + (test-equal "Parameters" '(dir file) args))) ;; Checks that parsing with custom regex works ;; along with literal periods. -(let ((path args (parse-endpoint-string "/static/:filename{.*}.:ext"))) - (test-equal "/static/(.*)\\.([^/.]+)" path) - (test-equal '(filename ext) args)) +(test-group + "Custom regex for parameters" + (let ((path args (parse-endpoint-string "/static/:filename{.*}.:ext"))) + (test-equal "Path" "/static/(.*)\\.([^/.]+)" path) + (test-equal "Parameters" '(filename ext) args))) |