Using raw response file in test

This commit is contained in:
Jay McCarthy 2010-05-17 11:04:20 -05:00
parent 28998cfe11
commit 5b38155e7f
4 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,7 @@
(require racunit
mzlib/etc
mzlib/list
xml
web-server/http
web-server/private/cache-table
web-server/private/web-server-structs
@ -53,6 +54,13 @@
[t0 (simple-xpath* '(p) (call d url0 empty))])
t0)
"Hello, Web!")
(test-equal? "response.rktd - loading"
(parameterize ([xexpr-drop-empty-attributes #t])
(let* ([d (mkd (build-path example-servlets "response.rktd"))])
(call d url0 empty)))
`(html (head (title "Hello"))
(body ([bgcolor "white"])
(p "Hello"))))
(test-add-two-numbers mkd "add.rkt - send/suspend"
(build-path example-servlets "add.rkt"))
(test-add-two-numbers mkd "add-v2.rkt - send/suspend, version 2"

View File

@ -1,3 +1,3 @@
`(html (head (title "Hello"))
(body ([bgcolor "white"])
(p #f "Hello")))
(p "Hello")))

View File

@ -152,7 +152,7 @@
(let-values ([(clear-cache! url->servlet)
(servlets:make-cached-url->servlet
(fsmap:filter-url->path
#rx"\\.(ss|scm|rkt)$"
#rx"\\.(ss|scm|rkt|rktd)$"
(fsmap:make-url->valid-path
(fsmap:make-url->path servlets-root)))
(make-default-path->servlet

View File

@ -79,7 +79,7 @@
(let-values ([(clear-cache! url->servlet)
(servlets:make-cached-url->servlet
(fsmap:filter-url->path
#rx"\\.(ss|scm|rkt)$"
#rx"\\.(ss|scm|rkt|rktd)$"
(fsmap:make-url->valid-path
(fsmap:make-url->path (paths-servlet (host-paths host-info)))))
(make-default-path->servlet