From 3379e2c4499bf3ca82de7043337e416ef15d24ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 28 Jun 2022 09:33:08 +0200 Subject: Various test cleanups. --- tests/test/server.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tests/test/server.scm') 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))) -- cgit v1.2.3