aboutsummaryrefslogtreecommitdiff
path: root/tests/test/server.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-28 09:33:08 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-07 21:14:09 +0200
commit3379e2c4499bf3ca82de7043337e416ef15d24ca (patch)
tree6d0b9e559f5795d4e7ca7b0d8e5a6044f9356176 /tests/test/server.scm
parentClean up crypto test. (diff)
downloadcalp-3379e2c4499bf3ca82de7043337e416ef15d24ca.tar.gz
calp-3379e2c4499bf3ca82de7043337e416ef15d24ca.tar.xz
Various test cleanups.
Diffstat (limited to 'tests/test/server.scm')
-rw-r--r--tests/test/server.scm16
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)))