Eskil

Check-in [5a97853587]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Support code coverage and stubs.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5a97853587f72bdb40e26f200a83c4c5526b4a92
User & Date: peter 2005-09-28 21:20:35.000
Context
2005-09-28
21:21
More tests, use stub. check-in: d0f12f5da5 user: peter tags: trunk
21:20
Support code coverage and stubs. check-in: 5a97853587 user: peter tags: trunk
21:09
Use FileIsDirectory everywhere to support kits. check-in: 4aeafb1c4e user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to tests/all.tcl.
10
11
12
13
14
15
16
17
18
19
20
21
22
23




24

25



















26
27
28
29
30

31
32
33

lappend auto_path eskil.vfs/lib

package require tcltest 2.2
namespace import tcltest::*
tcltest::configure -verbose "body error"
#testConstraint knownbug 1
#tcltest::configure -match eskil-1.*

package require Tk
wm withdraw .

set ::eskil_testsuite 1





source src/eskil.tcl

Init




















puts "Running Tests"

foreach test [glob -nocomplain $testDir/*.test] {
    source $test

}

exit







|






>
>
>
>
|
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





>



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
50
51
52
53
54
55
56
57
58

lappend auto_path eskil.vfs/lib

package require tcltest 2.2
namespace import tcltest::*
tcltest::configure -verbose "body error"
#testConstraint knownbug 1
#tcltest::configure -match blocks-*

package require Tk
wm withdraw .

set ::eskil_testsuite 1

if {[file exists src/eskil.tcl_i]} {
    puts "Running with code coverage"
    source src/eskil.tcl_i
} else {
    source src/eskil.tcl
}
Init

# Helpers to temporarily stub things out
set ::stubs {}
proc stub {name argv body} {
    if {[info commands _stub_$name] eq ""} {
        rename $name _stub_$name
    }
    proc $name $argv $body
    lappend ::stubs $name
}

proc clearstub {} {
    foreach name $::stubs {
        rename $name {}
        rename _stub_$name $name
    }
    set ::stubs {}
}


puts "Running Tests"

foreach test [glob -nocomplain $testDir/*.test] {
    source $test
    clearstub
}

exit