aboutsummaryrefslogtreecommitdiff
path: root/tests/server.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-07 15:31:00 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-07 20:29:14 +0100
commitf7716ac1a87649cad96242f2d5bf0a987d7f430c (patch)
treeb4b84951ef468fd644c42e9e0fee535d879f0387 /tests/server.scm
parentCleanup in (hnh util path). (diff)
downloadcalp-f7716ac1a87649cad96242f2d5bf0a987d7f430c.tar.gz
calp-f7716ac1a87649cad96242f2d5bf0a987d7f430c.tar.xz
Add new tests.
Diffstat (limited to 'tests/server.scm')
-rw-r--r--tests/server.scm21
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/server.scm b/tests/server.scm
deleted file mode 100644
index a2b3ea9d..00000000
--- a/tests/server.scm
+++ /dev/null
@@ -1,21 +0,0 @@
-;;; Commentary:
-;; Tests parse-endpoint-string, used for defining server routes.
-;;; Code:
-
-(((web http make-routes) parse-endpoint-string)
- ((hnh util) let*))
-
-(test-assert "Check that parsing doesn't crash"
- (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))
-
-
-;; 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))