summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/chanio.test3
-rw-r--r--tests/encoding.test3
-rw-r--r--tests/io.test3
-rw-r--r--tests/source.test3
-rw-r--r--tests/utf.test52
5 files changed, 30 insertions, 34 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index c2f561b..db4544c 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -29,8 +29,7 @@ namespace eval ::tcl::test::io {
variable msg
variable expected
- testConstraint ucs2 [expr { [llength [info commands testsize]] &&
- ([testsize unichar] == 2) }]
+ testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}]
testConstraint testchannel [llength [info commands testchannel]]
testConstraint exec [llength [info commands exec]]
testConstraint openpipe 1
diff --git a/tests/encoding.test b/tests/encoding.test
index ad55e26..af325c1 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -32,8 +32,7 @@ proc runtests {} {
testConstraint testencoding [llength [info commands testencoding]]
testConstraint exec [llength [info commands exec]]
-testConstraint ucs2 [expr { [llength [info commands testsize]] &&
- ([testsize unichar] == 2) }]
+testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}]
# TclInitEncodingSubsystem is tested by the rest of this file
diff --git a/tests/io.test b/tests/io.test
index 1c18576..06be982 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -29,8 +29,7 @@ namespace eval ::tcl::test::io {
variable msg
variable expected
-testConstraint ucs2 [expr { [llength [info commands testsize]] &&
- ([testsize unichar] == 2) }]
+testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}]
testConstraint testchannel [llength [info commands testchannel]]
testConstraint exec [llength [info commands exec]]
diff --git a/tests/source.test b/tests/source.test
index 8511004..877921e 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -20,8 +20,7 @@ if {[catch {package require tcltest 2.1}]} {
namespace eval ::tcl::test::source {
namespace import ::tcltest::*
-testConstraint ucs2 [expr { [llength [info commands testsize]] &&
- ([testsize unichar] == 2) }]
+testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}]
test source-1.1 {source command} -setup {
set x "old x value"
diff --git a/tests/utf.test b/tests/utf.test
index 0a81ae3..fd4e396 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -13,7 +13,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
namespace import -force ::tcltest::*
}
-testConstraint compat85 [expr {[format %c 0x010000] eq "\uFFFD"}]
+testConstraint ucs2 [expr {[format %c 0x010000] eq "\uFFFD"}]
testConstraint fullutf [expr {[format %c 0x010000] ne "\uFFFD"}]
testConstraint testbytestring [llength [info commands testbytestring]]
@@ -66,13 +66,13 @@ test utf-2.6 {Tcl_UtfToUniChar: lead (3-byte) followed by 1 trail} testbytestrin
test utf-2.7 {Tcl_UtfToUniChar: lead (3-byte) followed by 2 trail} testbytestring {
string length [testbytestring "\xE4\xB9\x8E"]
} {1}
-test utf-2.8.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {testbytestring compat85} -body {
+test utf-2.8.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {testbytestring ucs2} -body {
string length [testbytestring "\xF0\x90\x80\x80"]
} -result {4}
test utf-2.8.1 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {testbytestring fullutf} -body {
string length [testbytestring "\xF0\x90\x80\x80"]
} -result {1}
-test utf-2.9.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {testbytestring compat85} -body {
+test utf-2.9.0 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {testbytestring ucs2} -body {
string length [testbytestring "\xF4\x8F\xBF\xBF"]
} -result {4}
test utf-2.9.1 {Tcl_UtfToUniChar: lead (4-byte) followed by 3 trail} -constraints {testbytestring fullutf} -body {
@@ -126,7 +126,7 @@ test utf-4.10 {Tcl_NumUtfChars: #u0000, calc len, overcomplete} {testnumutfchars
test utf-4.11 {Tcl_NumUtfChars: 3 bytes of 4-byte UTF-8 characater} {testnumutfchars testbytestring} {
testnumutfchars [testbytestring \xF0\x9F\x92\xA9] 3
} {3}
-test utf-4.12.0 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring compat85} {
+test utf-4.12.0 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring ucs2} {
testnumutfchars [testbytestring \xF0\x9F\x92\xA9] 4
} {4}
test utf-4.12.1 {Tcl_NumUtfChars: #4-byte UTF-8 character} {testnumutfchars testbytestring fullutf} {
@@ -346,7 +346,7 @@ test utf-6.67 {Tcl_UtfNext} testutfnext {
test utf-6.68 {Tcl_UtfNext} testutfnext {
testutfnext -bytestring \xF2\xA0\xA0G
} 1
-test utf-6.69.0 {Tcl_UtfNext} {testutfnext compat85} {
+test utf-6.69.0 {Tcl_UtfNext} {testutfnext ucs2} {
testutfnext -bytestring \xF2\xA0\xA0\xA0
} 1
test utf-6.69.1 {Tcl_UtfNext} {testutfnext fullutf} {
@@ -364,37 +364,37 @@ test utf-6.71 {Tcl_UtfNext} testutfnext {
test utf-6.73 {Tcl_UtfNext} testutfnext {
testutfnext -bytestring \xF2\xA0\xA0\xF8
} 1
-test utf-6.74.0 {Tcl_UtfNext} {testutfnext compat85} {
+test utf-6.74.0 {Tcl_UtfNext} {testutfnext ucs2} {
testutfnext -bytestring \xF2\xA0\xA0\xA0G
} 1
test utf-6.74.1 {Tcl_UtfNext} {testutfnext fullutf} {
testutfnext -bytestring \xF2\xA0\xA0\xA0G
} 4
-test utf-6.75.0 {Tcl_UtfNext} {testutfnext compat85} {
+test utf-6.75.0 {Tcl_UtfNext} {testutfnext ucs2} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xA0
} 1
test utf-6.75.1 {Tcl_UtfNext} {testutfnext fullutf} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xA0
} 4
-test utf-6.76.0 {Tcl_UtfNext} {testutfnext compat85} {
+test utf-6.76.0 {Tcl_UtfNext} {testutfnext ucs2} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xD0
} 1
test utf-6.76.1 {Tcl_UtfNext} {testutfnext fullutf} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xD0
} 4
-test utf-6.77.0 {Tcl_UtfNext} {testutfnext compat85} {
+test utf-6.77.0 {Tcl_UtfNext} {testutfnext ucs2} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xE8
} 1
test utf-6.77.1 {Tcl_UtfNext} {testutfnext fullutf} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xE8
} 4
-test utf-6.78.0 {Tcl_UtfNext} {testutfnext compat85} {
+test utf-6.78.0 {Tcl_UtfNext} {testutfnext ucs2} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xF2
} 1
test utf-6.78.1 {Tcl_UtfNext} {testutfnext fullutf} {
testutfnext -bytestring \xF2\xA0\xA0\xA0\xF2
} 4
-test utf-6.79.0 {Tcl_UtfNext} {testutfnext compat85} {
+test utf-6.79.0 {Tcl_UtfNext} {testutfnext ucs2} {
testutfnext -bytestring \xF2\xA0\xA0\xA0G\xF8
} 1
test utf-6.79.1 {Tcl_UtfNext} {testutfnext fullutf} {
@@ -421,7 +421,7 @@ test utf-6.85 {Tcl_UtfNext - overlong sequences} testutfnext {
test utf-6.86 {Tcl_UtfNext - overlong sequences} testutfnext {
testutfnext -bytestring \xF0\x80\x80\x80
} 1
-test utf-6.87.0 {Tcl_UtfNext - overlong sequences} {testutfnext compat85} {
+test utf-6.87.0 {Tcl_UtfNext - overlong sequences} {testutfnext ucs2} {
testutfnext -bytestring \xF0\x90\x80\x80
} 1
test utf-6.87.1 {Tcl_UtfNext - overlong sequences} {testutfnext fullutf} {
@@ -433,7 +433,7 @@ test utf-6.88 {Tcl_UtfNext, pointing to 2th byte of 3-byte valid sequence} {test
test utf-6.89 {Tcl_UtfNext, pointing to 2th byte of 3-byte invalid sequence} {testutfnext} {
testutfnext -bytestring \x80\x80
} 1
-test utf-6.90.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext compat85} {
+test utf-6.90.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} {
testutfnext -bytestring \xF4\x8F\xBF\xBF
} 1
test utf-6.90.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} {
@@ -512,19 +512,19 @@ test utf-7.9.1 {Tcl_UtfPrev} testutfprev {
test utf-7.9.2 {Tcl_UtfPrev} testutfprev {
testutfprev A\xF8\xA0\xF8\xA0 3
} 2
-test utf-7.10.0 {Tcl_UtfPrev} {testutfprev compat85} {
+test utf-7.10.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xF2\xA0
} 2
test utf-7.10.1 {Tcl_UtfPrev} {testutfprev fullutf} {
testutfprev A\xF2\xA0
} 1
-test utf-7.10.1.0 {Tcl_UtfPrev} {testutfprev compat85} {
+test utf-7.10.1.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xF2\xA0\xA0\xA0 3
} 2
test utf-7.10.1.1 {Tcl_UtfPrev} {testutfprev fullutf} {
testutfprev A\xF2\xA0\xA0\xA0 3
} 1
-test utf-7.10.2.0 {Tcl_UtfPrev} {testutfprev compat85} {
+test utf-7.10.2.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xF2\xA0\xF8\xA0 3
} 2
test utf-7.10.2.1 {Tcl_UtfPrev} {testutfprev fullutf} {
@@ -569,19 +569,19 @@ test utf-7.14.1 {Tcl_UtfPrev} testutfprev {
test utf-7.14.2 {Tcl_UtfPrev} testutfprev {
testutfprev A\xF8\xA0\xA0\xF8 4
} 3
-test utf-7.15.0 {Tcl_UtfPrev} {testutfprev compat85} {
+test utf-7.15.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xF2\xA0\xA0
} 3
test utf-7.15.1 {Tcl_UtfPrev} {testutfprev fullutf} {
testutfprev A\xF2\xA0\xA0
} 1
-test utf-7.15.1.0 {Tcl_UtfPrev} {testutfprev compat85} {
+test utf-7.15.1.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xF2\xA0\xA0\xA0 4
} 3
test utf-7.15.1.1 {Tcl_UtfPrev} {testutfprev fullutf} {
testutfprev A\xF2\xA0\xA0\xA0 4
} 1
-test utf-7.15.2.0 {Tcl_UtfPrev} {testutfprev compat85} {
+test utf-7.15.2.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xF2\xA0\xA0\xF8 4
} 3
test utf-7.15.2.1 {Tcl_UtfPrev} {testutfprev fullutf} {
@@ -617,7 +617,7 @@ test utf-7.18.2 {Tcl_UtfPrev} testutfprev {
test utf-7.19 {Tcl_UtfPrev} testutfprev {
testutfprev A\xF8\xA0\xA0\xA0
} 4
-test utf-7.20.0 {Tcl_UtfPrev} {testutfprev compat85} {
+test utf-7.20.0 {Tcl_UtfPrev} {testutfprev ucs2} {
testutfprev A\xF2\xA0\xA0\xA0
} 4
test utf-7.20.1 {Tcl_UtfPrev} {testutfprev fullutf} {
@@ -683,19 +683,19 @@ test utf-7.37 {Tcl_UtfPrev -- overlong sequence} testutfprev {
test utf-7.38 {Tcl_UtfPrev -- overlong sequence} testutfprev {
testutfprev A\xE0\xA0\x80 2
} 1
-test utf-7.39.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev compat85} {
+test utf-7.39.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} {
testutfprev A\xF0\x90\x80\x80
} 4
test utf-7.39.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} {
testutfprev A\xF0\x90\x80\x80
} 1
-test utf-7.40.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev compat85} {
+test utf-7.40.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} {
testutfprev A\xF0\x90\x80\x80 4
} 3
test utf-7.40.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} {
testutfprev A\xF0\x90\x80\x80 4
} 1
-test utf-7.41.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev compat85} {
+test utf-7.41.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} {
testutfprev A\xF0\x90\x80\x80 3
} 2
test utf-7.41.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} {
@@ -725,19 +725,19 @@ test utf-7.47.1 {Tcl_UtfPrev, pointing to 3th byte of 3-byte valid sequence} {te
test utf-7.47.2 {Tcl_UtfPrev, pointing to 3th byte of 3-byte invalid sequence} {testutfprev} {
testutfprev \xE8\xA0\x00 2
} 0
-test utf-7.48.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev compat85} {
+test utf-7.48.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} {
testutfprev A\xF4\x8F\xBF\xBF
} 4
test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} {
testutfprev A\xF4\x8F\xBF\xBF
} 1
-test utf-7.48.1.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev compat85} {
+test utf-7.48.1.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} {
testutfprev A\xF4\x8F\xBF\xBF 4
} 3
test utf-7.48.1.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} {
testutfprev A\xF4\x8F\xBF\xBF 4
} 1
-test utf-7.48.2.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev compat85} {
+test utf-7.48.2.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} {
testutfprev A\xF4\x8F\xBF\xBF 3
} 2
test utf-7.48.2.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} {