Tcl Source Code

Check-in Differences
Login

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

Difference From b8be012969c62536 To 19b294baa382a2a3

2019-12-09
10:26
tcltest: hook enhancements rewritten backwards compatible now, reverts [0067db1bbf], [0f3d6f90f0], [... check-in: 2cf1202807 user: sebres tags: core-8-6-branch
2019-12-01
19:45
Add tcltest::EvalTest to make it easier to customize behaviour. check-in: 0f3d6f90f0 user: pooryorick tags: core-8-6-branch
13:52
merge 8.6 check-in: a6f87ee744 user: pooryorick tags: core-8-branch
13:48
Fix tcltest::SetupTest added in previous commit. check-in: b8be012969 user: pooryorick tags: core-8-6-branch
11:59
add tcltest::SetupTest to make it easier to customize the -setup step of a test check-in: 375a566d22 user: pooryorick tags: core-8-6-branch
2019-11-29
12:29
merge-mark check-in: f32c9854de user: jan.nijtmans tags: core-8-branch
12:27
Add some new test-cases involving e.g. Unicode 11. Backported from Tcl 8.7a3 check-in: 19b294baa3 user: jan.nijtmans tags: core-8-6-branch
2019-11-28
12:53
Enhance rules.vc like already done in other configure scripts: Determine HAVE_STDINT_H/HAVE_INTTYPES... check-in: 74a066a0b3 user: jan.nijtmans tags: core-8-6-branch

Changes to library/tcltest/tcltest.tcl.

1979
1980
1981
1982
1983
1984
1985
1986

1987
1988
1989
1990
1991
1992
1993
1994
1995
1979
1980
1981
1982
1983
1984
1985

1986


1987
1988
1989
1990
1991
1992
1993







-
+
-
-







    if {[preserveCore]} {
	if {[file exists [file join [workingDirectory] core]]} {
	    set coreModTime [file mtime [file join [workingDirectory] core]]
	}
    }

    # First, run the setup script
    set code [catch {
    set code [catch {uplevel 1 $setup} setupMsg]
		uplevel 1 [list [namespace which SetupTest] $setup]
	} setupMsg]
    if {$code == 1} {
	set errorInfo(setup) $::errorInfo
	set errorCodeRes(setup) $::errorCode
    }
    set setupFailure [expr {$code != 0}]

    # Only run the test body if the setup was successful
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2334
2335
2336
2337
2338
2339
2340


2341
2342
2343
2344
2345
2346
2347







-
-







	    }
	    return 1
	}
    }
    return 0
}



# RunTest --
#
# This is where the body of a test is evaluated.  The combination of
# [RunTest] and [Eval] allows the output and error output of the test
# body to be captured for comparison against the expected values.

proc tcltest::RunTest {name script} {
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2355
2356
2357
2358
2359
2360
2361










2362
2363
2364
2365
2366
2367
2368







-
-
-
-
-
-
-
-
-
-







    }

    set code [catch {uplevel 1 $script} actualAnswer]

    return [list $actualAnswer $code]
}



# SetupTest --
#
# Evaluates the -setup script for a test

proc tcltest::SetupTest setup {
    uplevel 1 $setup
}

#####################################################################

# tcltest::cleanupTestsHook --
#
#	This hook allows a harness that builds upon tcltest to specify
#       additional things that should be done at cleanup.
#