1 source [file dirname [info script]]/testing.tcl
3 test concat-1.1 {simple concatenation} {
6 test concat-1.2 {merging lists together} {
7 concat a {b c d} {e f g h}
9 test concat-1.3 {merge lists, retain sub-lists} {
10 concat a {b {c d}} {{e f}} g h
11 } {a b {c d} {e f} g h}
12 test concat-1.4 {special characters} {
13 concat a\{ {b \{c d} \{d
16 test concat-2.1 {error check: one empty argument} {
20 test concat-3.1 {error check: no arguments} {
21 list [catch concat msg] $msg
24 test concat-4.1 {pruning off extra white space} {
27 test concat-4.2 {pruning off extra white space} {
28 concat x y " a b c \n\t " " " " def "
30 test concat-4.3 {pruning off extra white space sets length correctly} {
31 llength [concat { {{a}} }]
34 test concat-5.1 {Tcl_ScanCountedElement procedure - don't leave unmatched braces} {
35 # This test checks for a very tricky feature. Any list element
36 # generated with Tcl_ScanCountedElement and Tcl_ConvertElement must
37 # have the property that it can be enclosing in curly braces to make
38 # an embedded sub-list. If this property doesn't hold, then
39 # Tcl_DStringStartSublist doesn't work.
43 concat $x [llength "{$x}"]
46 test concat-6.1 {Tcl_ConcatObj - backslash-space at end of argument} {
49 test concat-6.2 {Tcl_ConcatObj - backslash-space at end of argument} {
52 test concat-6.3 {Tcl_ConcatObj - backslash-space at end of argument} {
55 test concat-6.4 {Tcl_ConcatObj - backslash-space at end of argument} {
58 test concat-6.5 {Tcl_ConcatObj - backslash-space at end of argument} {
61 test concat-6.6 {Tcl_ConcatObj - utf-8 sequence with "whitespace" char} {
62 # Check for Bug #227512. If this violates C isspace, then it returns \xc3.