diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-15 13:18:33 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-15 13:18:33 (GMT) |
commit | 64c066f9bb2daa64cc0cf366d0c0812a828d2d61 (patch) | |
tree | 934228bab58b4be058c64ed75ac9363292cc7474 /tests/subst.test | |
parent | 773c4c75ee2ec9d60766f09ced30a5fef6d812c6 (diff) | |
parent | 74d71bafde63ca49cecadc990df7b3a2d7797849 (diff) | |
download | tcl-dgp_pkg_migration.zip tcl-dgp_pkg_migration.tar.gz tcl-dgp_pkg_migration.tar.bz2 |
merge trunkdgp_pkg_migration
Diffstat (limited to 'tests/subst.test')
-rw-r--r-- | tests/subst.test | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/subst.test b/tests/subst.test index 4be4798..498512d 100644 --- a/tests/subst.test +++ b/tests/subst.test @@ -21,7 +21,7 @@ test subst-1.1 {basics} -returnCodes error -body { } -result {wrong # args: should be "subst ?-nobackslashes? ?-nocommands? ?-novariables? string"} test subst-1.2 {basics} -returnCodes error -body { subst a b c -} -result {bad switch "a": must be -nobackslashes, -nocommands, or -novariables} +} -result {bad option "a": must be -nobackslashes, -nocommands, or -novariables} test subst-2.1 {simple strings} { subst {} @@ -119,13 +119,13 @@ test subst-6.1 {clear the result after command substitution} -body { test subst-7.1 {switches} -returnCodes error -body { subst foo bar -} -result {bad switch "foo": must be -nobackslashes, -nocommands, or -novariables} +} -result {bad option "foo": must be -nobackslashes, -nocommands, or -novariables} test subst-7.2 {switches} -returnCodes error -body { subst -no bar -} -result {ambiguous switch "-no": must be -nobackslashes, -nocommands, or -novariables} +} -result {ambiguous option "-no": must be -nobackslashes, -nocommands, or -novariables} test subst-7.3 {switches} -returnCodes error -body { subst -bogus bar -} -result {bad switch "-bogus": must be -nobackslashes, -nocommands, or -novariables} +} -result {bad option "-bogus": must be -nobackslashes, -nocommands, or -novariables} test subst-7.4 {switches} { set x 123 subst -nobackslashes {abc $x [expr 1+2] \\\x41} @@ -293,6 +293,10 @@ test subst-13.1 {Bug 3081065} -setup { } -cleanup { removeFile subst13.tcl } +test subst-13.2 {Test for segfault} -body { + subst {[} +} -returnCodes error -result * -match glob + # cleanup ::tcltest::cleanupTests |