# Commands covered: concat # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # # Copyright 1991 Regents of the University of California # Permission to use, copy, modify, and distribute this # software and its documentation for any purpose and without # fee is hereby granted, provided that this copyright notice # appears in all copies. The University of California makes no # representations about the suitability of this software for any # purpose. It is provided "as is" without express or implied # warranty. # # $Header: /a/cvs/386BSD/ports/tcl/tests/concat.test,v 1.1.1.1 1993/08/09 10:57:42 alm Exp $ (Berkeley) if {[string compare test [info procs test]] == 1} then {source defs} test concat-1.1 {simple concatenation} { concat a b c d e f g } {a b c d e f g} test concat-1.2 {merging lists together} { concat a {b c d} {e f g h} } {a b c d e f g h} test concat-1.3 {merge lists, retain sub-lists} { concat a {b {c d}} {{e f}} g h } {a b {c d} {e f} g h} test concat-1.4 {special characters} { concat a\{ {b \{c d} \{d } "a{ b \\{c d {d" test concat-2.1 {error: no arguments} {catch concat} 1 test concat-2.2 {error: no arguments} { catch concat msg set msg } {wrong # args: should be "concat arg ?arg ...?"} test concat-3.1 {pruning off extra white space} { concat {} {a b c} } {a b c} test concat-3.2 {pruning off extra white space} { concat x y " a b c \n\t " " " " def " } {x y a b c def}