1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
# -- check_inspect
#
# tests ::rivet::inspect in its different forms
#
proc check_inspect { cmd_form args } {
set ::failtest(inspect${cmd_form}) 0
set cmdeval [list ::rivet::inspect {*}$args]
if {[catch {eval $cmdeval}]} { set ::failtest(inspect${cmd_form}) 1 }
}
# -- check_fail
#
# general purpose test function for commands having a single form
#
proc check_fail {cmd args} {
set ::failtest($cmd) 0
set cmdeval [list $cmd {*}$args]
if {[catch {eval $cmdeval}]} { set ::failtest($cmd) 1 }
}
array set ::failtest { }
#if {[catch {::rivet::env HTTP_HOST}]} { set ::failtest(env) 1 }
#if {[catch {::rivet::makeurl}]} { set ::failtest(makeurl) 1 }
check_fail apache_table names headers_in
check_fail env HTTP_HOST
check_fail makeurl
check_fail parse template.rvt
check_fail include -virtual
check_fail headers redirect http://tcl.apache.org/
check_fail load_env
check_fail load_headers
check_fail raw_post
check_fail var all
check_fail no_body
check_fail virtual_filename unkn
check_inspect 0
check_inspect 1 ChildInitScript
check_inspect 2 -all
check_inspect 3 server
check_inspect 4 script
|