summaryrefslogtreecommitdiffstats
path: root/tests/subst.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-07-22 20:27:59 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-07-22 20:27:59 (GMT)
commit421cb095720c641b6cef201242354a338207d3c3 (patch)
tree376b30b6fcfff8ed2d90f77837b5018081403808 /tests/subst.test
parent18b04fd803de5db258180ee7d4d4d128a77fb03d (diff)
parent91e311e52d7fd08f0eb70ddd211e5aa51a5e2d22 (diff)
downloadtcl-421cb095720c641b6cef201242354a338207d3c3.zip
tcl-421cb095720c641b6cef201242354a338207d3c3.tar.gz
tcl-421cb095720c641b6cef201242354a338207d3c3.tar.bz2
merge trunk
Diffstat (limited to 'tests/subst.test')
-rw-r--r--tests/subst.test12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/subst.test b/tests/subst.test
index 498512d..256b7f7 100644
--- a/tests/subst.test
+++ b/tests/subst.test
@@ -15,6 +15,10 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
namespace import -force ::tcltest::*
}
+::tcltest::loadTestedCommands
+catch [list package require -exact Tcltest [info patchlevel]]
+
+testConstraint testbytestring [llength [info commands testbytestring]]
test subst-1.1 {basics} -returnCodes error -body {
subst
@@ -32,16 +36,16 @@ test subst-2.2 {simple strings} {
test subst-2.3 {simple strings} {
subst abcdefg
} abcdefg
-test subst-2.4 {simple strings} {
+test subst-2.4 {simple strings} testbytestring {
# Tcl Bug 685106
- subst [bytestring bar\x00soom]
-} [bytestring bar\x00soom]
+ subst [testbytestring bar\x00soom]
+} [testbytestring bar\x00soom]
test subst-3.1 {backslash substitutions} {
subst {\x\$x\[foo bar]\\}
} "x\$x\[foo bar]\\"
test subst-3.2 {backslash substitutions with utf chars} {
- # 'j' is just a char that doesn't mean anything, and \344 is 'ä'
+ # 'j' is just a char that doesn't mean anything, and \344 is 'ä'
# that also doesn't mean anything, but is multi-byte in UTF-8.
list [subst \j] [subst \\j] [subst \\344] [subst \\\344]
} "j j \344 \344"