aboutsummaryrefslogtreecommitdiff
path: root/tests/guile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/guile')
-rw-r--r--tests/guile/cantius-test.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/guile/cantius-test.scm b/tests/guile/cantius-test.scm
index f3e628a..04176f9 100644
--- a/tests/guile/cantius-test.scm
+++ b/tests/guile/cantius-test.scm
@@ -6,6 +6,7 @@
((srfi srfi-26) #:select (cut))
((srfi srfi-34) #:select (guard raise))
((ice-9 safe-r5rs) #:select (null-environment))
+ ((ice-9 format) #:select (format))
((web client) #:select (open-socket-for-uri http-get))
((web response) #:prefix rsp:)
((web uri) #:prefix uri:)
@@ -36,6 +37,7 @@
#:use-module ((srfi srfi-18) #:select
(make-thread thread-terminate! thread-yield!
thread-start!))
+ #:use-module ((ice-9 format) #:select (format))
#:use-module (cantius))
(define sock-port
@@ -59,7 +61,10 @@
(define-endpoint %my-endset drm-wiki
("drm-wiki" ,(string-append "dev" "ices") . some-path) '()
(values (build-response*)
- (string-join (cons "page for:" some-path))))
+ (format #f "~@{~@?~%~^~}"
+ "full page path1: ~a" (%current-path-string)
+ "full page path2: ~{/~a~}" (%current-path)
+ "device page path: ~{/~a~}" some-path)))
(define-endpoint %my-endset about-google
,(list "cool-companies" "google" "about")
@@ -145,7 +150,11 @@
(define ipad-result
(get "/drm-wiki/devices/apple/ipad"))
- (tu:test-equal "page for: apple ipad" (cadr ipad-result)))
+ (tu:test-equal (format #f "~@{~a~%~}"
+ "full page path1: /drm-wiki/devices/apple/ipad"
+ "full page path2: /drm-wiki/devices/apple/ipad"
+ "device page path: /apple/ipad")
+ (cadr ipad-result)))
(tu:test-group "about-google"
(define google-result