3 # Copyright (C) 2004-2006, 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 is [lrepeat 1 a] a {1x1}
16 is [lrepeat 1 a b] {a b} {1x2}
17 is [lrepeat 2 a] {a a} {2x1}
18 is [lrepeat 2 a b] {a b a b} {2x2}
20 is [lrepeat 2 [list a b]] {{a b} {a b}} {nested lists}
24 {wrong # args: should be "lrepeat positiveCount value ?value ...?"} \
27 eval_is {lrepeat -1 2} \
28 {must have a count of at least 1} \
31 eval_is {lrepeat 0 2} \
32 {must have a count of at least 1} \
35 eval_is {lrepeat 0.2 2} \
36 {expected integer but got "0.2"} \