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
16 is [list] {} {no elements}
17 is [list a] {a} {one element}
18 is [list a b] {a b} {two elements}
20 is [list a b {c {d e}}] {a b {c {d e}}} {spaces with braces}
21 is [list a b "c {d e}"] {a b {c {d e}}} {spaces with quotes}
22 is [list {1 2} {3 4}] {{1 2} {3 4}} {spaces in two elements}
24 is [list "} {"] {\}\ \{} {braces with spaces}
25 is [list \{ \}] {\{ \}} {braces}
27 is [list "\n"] "{\n}" {newline}
28 is [list ";"] {{;}} {semicolon}
29 is [list "\t"] "{\t}" {tab}
30 is [list "$"] {{$}} {dollar}
31 is [list "\\"] {\\} {backslash}
32 is [list \[] {{[}} {open bracket}
33 is [list \]] {\]} {close bracket}
35 # hashes are protected only if they're the first char in the first element.
36 is [list #] {{#}} {comment hash}
37 is [list #foo] {{#foo}} {comment hash}
38 is [list #foo #bar] {{#foo} #bar} {comment hash}