
* Another big chunk of v4-require-isms * Allow `#lang framework/keybinding-lang' for keybinding files * Move hierlist sources into "mrlib/hierlist", leave stub behind svn: r10689
47 lines
1.6 KiB
Scheme
47 lines
1.6 KiB
Scheme
;; Mike Burns, July 26th, 2004, netgeek@speakeasy.net
|
|
;; Test the ability to start and stop the server via the library.
|
|
(module test-web-server mzscheme
|
|
(require web-server/web-server
|
|
web-server/configuration
|
|
schemeunit/test
|
|
mzlib/etc)
|
|
|
|
(provide test-web-server)
|
|
|
|
(define the-configuration
|
|
;;; TODO: test load-configuration
|
|
(load-configuration (expand-path "configuration-table")))
|
|
|
|
(define the-port 8135)
|
|
|
|
(define the-ip "127.0.0.1")
|
|
|
|
(define test-web-server
|
|
(make-test-suite
|
|
"Start and stop the Web server from the library"
|
|
(let ((stop #f))
|
|
(make-test-case
|
|
"Start the Web server with just the configuration"
|
|
(assert-pred procedure? (begin
|
|
(set! stop (serve the-configuration))
|
|
stop))
|
|
(when stop (stop))))
|
|
(let ((stop #f))
|
|
(make-test-case
|
|
"Start the Web server with the configuration and port"
|
|
(assert-pred procedure? (begin
|
|
(set! stop (serve the-configuration
|
|
the-port))
|
|
stop))
|
|
(when stop (stop))))
|
|
(let ((stop #f))
|
|
(make-test-case
|
|
"Start the Web server with the configuration, port, and IP address"
|
|
(assert-pred procedure? (begin
|
|
(set! stop (serve the-configuration
|
|
the-port the-ip))
|
|
stop))
|
|
(when stop (stop))))))
|
|
|
|
)
|