3 # Copyright (C) 2004-2008, The Perl Foundation.
6 # the following lines re-execute this as a tcl script
7 # the \ at the end of these lines makes them a comment in tcl \
8 use lib qw(languages/tcl/lib tcl/lib lib ../lib ../../lib); # \
12 source lib/test_more.tcl
43 } false {simple if with then}
53 } true {simple if with then, else}
63 } blue {if with then, elseif}
73 } elseif {if with then, elseif with then}
85 } whee {if with then, elseif, else}
97 } 3 {if with elseif, implicit else}
105 } {} {if with implicit then, false}
113 } true {if with implicit then, true}
123 } {} {nothing is true}
126 if {"foo"} then {error moo}
127 } {expected boolean value but got "foo"} \
132 if 2 then {set a true}
134 } true {numeric non-0 is true}
143 } ok {namespace resolution in cond}
151 } ok {namespace resolution in body}
156 {expression errors before [if] errors}
158 eval_is {if 0 then} \
159 {wrong # args: no script following "then" argument} \
160 {no script following then}
163 {wrong # args: no script following "0" argument} \
164 {no script following conditional}