Moved to SU3

svn: r13712
This commit is contained in:
Jay McCarthy 2009-02-17 22:11:39 +00:00
parent acef860a60
commit 76853279c3
46 changed files with 63 additions and 64 deletions

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"configuration/all-configuration-tests.ss" "configuration/all-configuration-tests.ss"
"dispatchers/all-dispatchers-tests.ss" "dispatchers/all-dispatchers-tests.ss"
"lang/all-lang-tests.ss" "lang/all-lang-tests.ss"

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"configuration-table-test.ss") "configuration-table-test.ss")
(provide all-configuration-tests) (provide all-configuration-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(only-in mzlib/file (only-in mzlib/file
make-temporary-file) make-temporary-file)
web-server/configuration/configuration-table) web-server/configuration/configuration-table)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"dispatch-passwords-test.ss" "dispatch-passwords-test.ss"
"dispatch-files-test.ss" "dispatch-files-test.ss"
"dispatch-servlets-test.ss" "dispatch-servlets-test.ss"

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(only-in mzlib/file (only-in mzlib/file
file-name-from-path file-name-from-path
make-temporary-file) make-temporary-file)
@ -45,10 +45,14 @@
(test-case (test-case
"read-range-header: missing and badly formed headers" "read-range-header: missing and badly formed headers"
(check-false (files:read-range-header (list (make-header #"Ranges" #"bytes=1-10"))) "check 1") (check-false (files:read-range-header (list (make-header #"Ranges" #"bytes=1-10"))) "check 1")
(check-false (files:read-range-header (list (make-header #"Range" #"completely wrong"))) "check 2") (check-false (parameterize ([current-error-port (open-output-nowhere)])
(check-false (files:read-range-header (list (make-header #"Range" #"byte=1-10"))) "check 3") (files:read-range-header (list (make-header #"Range" #"completely wrong")))) "check 2")
(check-false (files:read-range-header (list (make-header #"Range" #"bytes=a-10"))) "check 4") (check-false (parameterize ([current-error-port (open-output-nowhere)])
(check-false (files:read-range-header (list (make-header #"Range" #"bytes=1-1.0"))) "check 5")) (files:read-range-header (list (make-header #"Range" #"byte=1-10")))) "check 3")
(check-false (parameterize ([current-error-port (open-output-nowhere)])
(files:read-range-header (list (make-header #"Range" #"bytes=a-10")))) "check 4")
(check-false (parameterize ([current-error-port (open-output-nowhere)])
(files:read-range-header (list (make-header #"Range" #"bytes=1-1.0")))) "check 5"))
(test-case (test-case
"read-range-header: single range" "read-range-header: single range"

View File

@ -1,6 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "util.ss" ("schematics" "schemeunit.plt" 2))
(only-in mzlib/file (only-in mzlib/file
make-temporary-file) make-temporary-file)
net/url net/url

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "sxml.ss" ("lizorkin" "sxml.plt" 2 0)) (planet "sxml.ss" ("lizorkin" "sxml.plt" 2 0))
mzlib/etc mzlib/etc
mzlib/list mzlib/list

View File

@ -1,6 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "util.ss" ("schematics" "schemeunit.plt" 2))
(only-in mzlib/file (only-in mzlib/file
make-temporary-file) make-temporary-file)
net/url net/url

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "sxml.ss" ("lizorkin" "sxml.plt" 2 0)) (planet "sxml.ss" ("lizorkin" "sxml.plt" 2 0))
mzlib/etc mzlib/etc
mzlib/list mzlib/list

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
net/url net/url
web-server/private/util web-server/private/util
web-server/dispatchers/filesystem-map) web-server/dispatchers/filesystem-map)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "sxml.ss" ("lizorkin" "sxml.plt" 2 0)) (planet "sxml.ss" ("lizorkin" "sxml.plt" 2 0))
mzlib/list mzlib/list
web-server/http web-server/http

View File

@ -1,5 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
net/url net/url
web-server/http web-server/http
web-server/formlets web-server/formlets

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"cookies-test.ss" "cookies-test.ss"
"digest-auth-test.ss") "digest-auth-test.ss")
(provide all-http-tests) (provide all-http-tests)

View File

@ -1,5 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
net/url net/url
web-server/http/request-structs web-server/http/request-structs
web-server/http/response-structs web-server/http/response-structs
@ -57,11 +57,11 @@
"xexpr-response/cookies" "xexpr-response/cookies"
(test-equal? "Simple" (test-equal? "Simple"
(response/full-body (xexpr-response/cookies empty `(html))) (response/full-body (xexpr-response/cookies empty `(html)))
(list #"<html></html>")) (list #"<html />"))
(test-equal? "One (body)" (test-equal? "One (body)"
(response/full-body (xexpr-response/cookies (list (make-cookie "name" "value")) `(html))) (response/full-body (xexpr-response/cookies (list (make-cookie "name" "value")) `(html)))
(list #"<html></html>")) (list #"<html />"))
(test-equal? "One (headers)" (test-equal? "One (headers)"
(map (lambda (h) (cons (header-field h) (header-value h))) (map (lambda (h) (cons (header-field h) (header-value h)))

View File

@ -1,5 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/http web-server/http
net/url) net/url)
(provide digest-auth-tests) (provide digest-auth-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"util.ss") "util.ss")
(provide lang-tests) (provide lang-tests)
@ -240,7 +240,7 @@
(let* ([first-key (table-01-eval '(dispatch-start start 'foo))] (let* ([first-key (table-01-eval '(dispatch-start start 'foo))]
[second-key (table-01-eval `(dispatch lookup-k '(,first-key 1)))] [second-key (table-01-eval `(dispatch lookup-k '(,first-key 1)))]
[third-key (table-01-eval `(dispatch lookup-k '(,first-key -7)))]) [third-key (table-01-eval `(dispatch lookup-k '(,first-key -7)))])
(printf "~S~n" (list first-key second-key third-key)) #;(printf "~S~n" (list first-key second-key third-key))
(check = 3 (table-01-eval `(dispatch lookup-k '(,second-key 2)))) (check = 3 (table-01-eval `(dispatch lookup-k '(,second-key 2))))
(check = 4 (table-01-eval `(dispatch lookup-k '(,second-key 3)))) (check = 4 (table-01-eval `(dispatch lookup-k '(,second-key 3))))
(check-true (zero? (table-01-eval `(dispatch lookup-k '(,second-key -1))))) (check-true (zero? (table-01-eval `(dispatch lookup-k '(,second-key -1)))))

View File

@ -1,6 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "util.ss" ("schematics" "schemeunit.plt" 2))
web-server/lang/abort-resume) web-server/lang/abort-resume)
(require/expose web-server/lang/abort-resume (web-prompt)) (require/expose web-server/lang/abort-resume (web-prompt))
(provide abort-resume-tests) (provide abort-resume-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"abort-resume-test.ss" "abort-resume-test.ss"
"anormal-test.ss" "anormal-test.ss"
"defun-test.ss" "defun-test.ss"

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/lang/anormal web-server/lang/anormal
web-server/lang/util) web-server/lang/util)
(provide anormal-tests) (provide anormal-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/lang/defun web-server/lang/defun
web-server/lang/util) web-server/lang/util)
(provide defun-tests) (provide defun-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/lang/file-box web-server/lang/file-box
(only-in mzlib/file make-temporary-file)) (only-in mzlib/file make-temporary-file))
(provide file-box-tests) (provide file-box-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/lang/labels) web-server/lang/labels)
(provide labels-tests) (provide labels-tests)

View File

@ -1,7 +1,7 @@
#lang scheme/base #lang scheme/base
(require web-server/lang/stuff-url (require web-server/lang/stuff-url
web-server/stuffers web-server/stuffers
(planet "test.ss" ("schematics" "schemeunit.plt" 2)) (planet schematics/schemeunit:3)
net/url net/url
mzlib/serialize mzlib/serialize
"../util.ss") "../util.ss")

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"../util.ss") "../util.ss")
(provide web-param-tests) (provide web-param-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))) (require (planet schematics/schemeunit:3))
(provide all-managers-tests) (provide all-managers-tests)
(define all-managers-tests (define all-managers-tests

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"request-test.ss" "request-test.ss"
"cache-table-test.ss" "cache-table-test.ss"
"response-test.ss" "response-test.ss"

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/private/cache-table) web-server/private/cache-table)
(provide cache-table-tests) (provide cache-table-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/private/connection-manager) web-server/private/connection-manager)
(provide connection-manager-tests) (provide connection-manager-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
mzlib/serialize mzlib/serialize
mzlib/match mzlib/match
web-server/private/define-closure) web-server/private/define-closure)

View File

@ -1,5 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/private/gzip) web-server/private/gzip)
(provide gzip-tests) (provide gzip-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(only-in mzlib/file make-temporary-file) (only-in mzlib/file make-temporary-file)
web-server/http web-server/http
web-server/private/mime-types) web-server/private/mime-types)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/private/mod-map web-server/private/mod-map
mzlib/serialize mzlib/serialize
"../util.ss") "../util.ss")

View File

@ -1,6 +1,5 @@
#lang scheme #lang scheme
(require (planet "util.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "test.ss" ("schematics" "schemeunit.plt" 2))
web-server/private/connection-manager web-server/private/connection-manager
web-server/private/timer web-server/private/timer
web-server/http) web-server/http)

View File

@ -1,6 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "util.ss" ("schematics" "schemeunit.plt" 2))
xml/xml xml/xml
(only-in mzlib/file (only-in mzlib/file
make-temporary-file) make-temporary-file)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
mzlib/list mzlib/list
net/url net/url
web-server/private/session) web-server/private/session)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
net/url net/url
web-server/private/url-param) web-server/private/url-param)
(provide url-param-tests) (provide url-param-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
net/url net/url
xml/xml xml/xml
mzlib/contract mzlib/contract

View File

@ -1,6 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "graphical-ui.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3/text-ui)
(planet "text-ui.ss" ("schematics" "schemeunit.plt" 2))
"all-web-server-tests.ss") "all-web-server-tests.ss")
(test/graphical-ui all-web-server-tests) (run-tests all-web-server-tests)

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
#;(only (planet "ssax.ss" ("lizorkin" "ssax.plt" 1 3)) #;(only (planet "ssax.ss" ("lizorkin" "ssax.plt" 1 3))
ssax:xml->sxml) ssax:xml->sxml)
#;(planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4)) #;(planet "sxml.ss" ("lizorkin" "sxml.plt" 1 4))

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
"bindings-test.ss" "bindings-test.ss"
"basic-auth-test.ss" "basic-auth-test.ss"
"helpers-test.ss" "helpers-test.ss"

View File

@ -1,5 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/http web-server/http
net/url) net/url)
(provide basic-auth-tests) (provide basic-auth-tests)

View File

@ -1,5 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
mzlib/list mzlib/list
net/url net/url
web-server/http web-server/http

View File

@ -1,5 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/servlet) web-server/servlet)
(provide helpers-tests) (provide helpers-tests)

View File

@ -1,6 +1,5 @@
#lang scheme/base #lang scheme/base
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
(planet "util.ss" ("schematics" "schemeunit.plt" 2))
net/url net/url
web-server/servlet/web) web-server/servlet/web)
(require/expose web-server/servlet/web (require/expose web-server/servlet/web

View File

@ -1,5 +1,5 @@
#lang scheme #lang scheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2)) (require (planet schematics/schemeunit:3)
web-server/stuffers web-server/stuffers
web-server/private/servlet web-server/private/servlet
web-server/http web-server/http

View File

@ -23,7 +23,7 @@
(match (regexp-match #"^.+\r\n\r\n(.+)$" bs) (match (regexp-match #"^.+\r\n\r\n(.+)$" bs)
[(list _ s) [(list _ s)
(define sx (ssax:xml->sxml (open-input-bytes s) empty)) (define sx (ssax:xml->sxml (open-input-bytes s) empty))
(pretty-print sx) #;(pretty-print sx)
sx] sx]
[_ [_
(error 'html "Given ~S~n" bs)])) (error 'html "Given ~S~n" bs)]))
@ -107,7 +107,8 @@
(eval '(require 'm-id))) (eval '(require 'm-id)))
(lambda (s-expr) (lambda (s-expr)
(parameterize ([current-namespace ns]) (parameterize ([current-namespace ns]
[current-output-port (open-output-nowhere)])
(eval s-expr))))] (eval s-expr))))]
[else [else
(raise-syntax-error #f "make-module-evel: dropped through" m-expr)])) (raise-syntax-error #f "make-module-evel: dropped through" m-expr)]))
@ -121,5 +122,6 @@
(namespace-require 'mzlib/serialize) (namespace-require 'mzlib/serialize)
(namespace-require pth)) (namespace-require pth))
(lambda (expr) (lambda (expr)
(parameterize ([current-namespace ns]) (parameterize ([current-namespace ns]
[current-output-port (open-output-nowhere)])
(eval expr))))) (eval expr)))))