3 # Copyright (C) 2005-2007, 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
15 # https://sourceforge.net/tracker/index.php?func=detail&aid=1534628&group_id=10894&atid=110894 {RESOLVED}
17 {wrong # args: should be "lassign list varName ?varName ...?"} \
20 eval_is {lassign {a b}} \
21 {wrong # args: should be "lassign list varName ?varName ...?"} \
25 set b [lassign {x y} a]
27 } {x y} {singleton with one leftover}
30 set b [lassign {x y z} a]
32 } {x {y z}} {singleton with two leftovers}
35 set c [lassign {x y z} a b]
37 } {x y z} {double with a leftover}
40 set d [lassign {x y z} a b c]
42 } {x y z {}} {triple, no leftovers}
45 set e [lassign {x y z} a b c d]
47 } {x y z {} {}} {4 variables, not enough values}