aboutsummaryrefslogtreecommitdiff
path: root/tests/return.test
blob: 3ed659a8abd9c42639d3ea19a5d4f29836e2dc09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
source testing.tcl

# return -code

test return-1.1 {return -code} {
	set script "return -code 4 result"
	list [catch {eval $script} msg] $msg
} {2 result}

test return-1.2 {source file with break} {
	list [catch {source break.tcl} msg] $msg
} {3 {}}

test return-1.2 {source file with break} {
	list [catch {source return-break.tcl} msg] $msg
} {3 result}