File: inspect.test

package info (click to toggle)
libapache2-mod-rivet 3.2.2-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 6,296 kB
  • sloc: xml: 8,554; tcl: 7,568; ansic: 7,094; sh: 5,017; makefile: 195; sql: 91; lisp: 78
file content (38 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download | duplicates (4)
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

::tcltest::test inspect-1.1 {basic introspection 1.1} {
    apachetest::start { 
            -c "RivetServerConf ChildInitScript \"set init 1\"" } {} {
        catch {
            set inspect_page [::http::geturl "${urlbase}inspect.tcl?p=childinit"]
            set match [string trim [::http::data $inspect_page]]
            ::http::cleanup $inspect_page
        }
    }
    set match
} {set init 1}

::tcltest::test inspect-1.2 {basic introspection 1.2} {
    apachetest::start { 
            -c "RivetServerConf ChildInitScript \"set init 1\"" } {} {
        catch {
            set inspect_page [::http::geturl "${urlbase}inspect.tcl"]
            set match [string trim [::http::data $inspect_page]]
            ::http::cleanup $inspect_page
        }
    }
    set match
} {server {ChildInitScript {set init 1}}}

::tcltest::test inspect-1.3 {basic introspection 1.3} {
    file copy -force inspect.tcl /tmp/
    apachetest::start {
        -c "DocumentRoot /tmp" } {} {
        catch {
            set inspect_page [::http::geturl "${urlbase}inspect.tcl?p=script"]
            set match [::http::data $inspect_page]
            ::http::cleanup $inspect_page
        }
    }
    file delete /tmp/inspect.tcl
    set match
} {/tmp/inspect.tcl}