summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2021-11-05 23:03:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2021-11-05 23:03:19 (GMT)
commitd69b01cc0e1ec14e8240960d69a5ae7dc43582b0 (patch)
tree4a041ddbec0d1293a89a1ebf88bc184494f27afb /tests
parent2fa701714b98ad5633aef5b36015c2b8ab29f4c5 (diff)
parentdbd78043d741de40291258071afecc4b0177c25e (diff)
downloadtcl-d69b01cc0e1ec14e8240960d69a5ae7dc43582b0.zip
tcl-d69b01cc0e1ec14e8240960d69a5ae7dc43582b0.tar.gz
tcl-d69b01cc0e1ec14e8240960d69a5ae7dc43582b0.tar.bz2
merge trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdIL.test2
-rw-r--r--tests/encoding.test24
-rw-r--r--tests/format.test4
-rw-r--r--tests/io.test2
-rw-r--r--tests/lset.test2
-rw-r--r--tests/proc.test9
-rw-r--r--tests/regexp.test2
-rw-r--r--tests/string.test1
-rw-r--r--tests/tcltests.tcl1
-rw-r--r--tests/var.test2
10 files changed, 40 insertions, 9 deletions
diff --git a/tests/cmdIL.test b/tests/cmdIL.test
index 063750c..5a68925 100644
--- a/tests/cmdIL.test
+++ b/tests/cmdIL.test
@@ -776,7 +776,7 @@ test cmdIL-7.6 {lreverse command - unshared object [Bug 1672585]} {
test cmdIL-7.7 {lreverse command - empty object [Bug 1876793]} {
lreverse [list]
} {}
-test cmdIL-7.8 {lreverse command - shared intrep [Bug 1675044]} -setup {
+test cmdIL-7.8 {lreverse command - shared internalrep [Bug 1675044]} -setup {
teststringobj set 1 {1 2 3}
testobj convert 1 list
testobj duplicate 1 2
diff --git a/tests/encoding.test b/tests/encoding.test
index f7862bc..3d96e87 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -287,6 +287,12 @@ test encoding-11.8 {encoding: extended Unicode UTF-16} {
test encoding-11.9 {encoding: extended Unicode UTF-16} {
viewable [encoding convertto utf-16be 😹]
} {Ø=Þ9 (\u00D8=\u00DE9)}
+test encoding-11.10 {encoding: extended Unicode UTF-32} {
+ viewable [encoding convertto utf-32le 😹]
+} "9\xF6\x01\x00 (9\\u00F6\\u0001\\u0000)"
+test encoding-11.11 {encoding: extended Unicode UTF-32} {
+ viewable [encoding convertto utf-32be 😹]
+} "\x00\x01\xF69 (\\u0000\\u0001\\u00F69)"
# OpenEncodingFile is fully tested by the rest of the tests in this file.
test encoding-12.1 {LoadTableEncoding: normal encoding} {
@@ -461,10 +467,18 @@ test encoding-16.4 {Ucs2ToUtfProc} -body {
set val [encoding convertfrom ucs-2 NN]
list $val [format %x [scan $val %c]]
} -result "乎 4e4e"
-test encoding-16.4 {Ucs2ToUtfProc} -body {
+test encoding-16.5 {Ucs2ToUtfProc} -body {
set val [encoding convertfrom ucs-2 "\xD8\xD8\xDC\xDC"]
list $val [format %x [scan $val %c]]
} -result "\U460DC 460dc"
+test encoding-16.6 {Utf32ToUtfProc} -body {
+ set val [encoding convertfrom utf-32le NN\0\0]
+ list $val [format %x [scan $val %c]]
+} -result "乎 4e4e"
+test encoding-16.7 {Utf32ToUtfProc} -body {
+ set val [encoding convertfrom utf-32be \0\0NN]
+ list $val [format %x [scan $val %c]]
+} -result "乎 4e4e"
test encoding-17.1 {UtfToUtf16Proc} -body {
encoding convertto utf-16 "\U460DC"
@@ -478,6 +492,12 @@ test encoding-17.3 {UtfToUtf16Proc} -body {
test encoding-17.4 {UtfToUtf16Proc} -body {
encoding convertto utf-16le "\uD8D8"
} -result "\xFD\xFF"
+test encoding-17.5 {UtfToUtf16Proc} -body {
+ encoding convertto utf-32le "\U460DC"
+} -result "\xDC\x60\x04\x00"
+test encoding-17.6 {UtfToUtf16Proc} -body {
+ encoding convertto utf-32be "\U460DC"
+} -result "\x00\x04\x60\xDC"
test encoding-18.1 {TableToUtfProc} {
} {}
@@ -779,7 +799,7 @@ test encoding-28.0 {all encodings load} -body {
llength $name
}
return $count
-} -result [expr {[info exists ::tcl_precision] ? 89 : 88}]
+} -result 91
runtests
diff --git a/tests/format.test b/tests/format.test
index d990fb6..f6d9cfd 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -620,12 +620,12 @@ test format-19.4.2 {Bug d498578df4: width overflow should cause limit exceeded}
} -returnCodes error -result "max size for a Tcl value exceeded"
# Note that this test may fail in future versions
-test format-20.1 {Bug 2932421: plain %s caused intrep change of args} -body {
+test format-20.1 {Bug 2932421: plain %s caused internalrep change of args} -body {
set x [dict create a b c d]
format %s $x
# After this, obj in $x should be a dict
# We are testing to make sure it has not been shimmered to a
- # different intrep when that is not necessary.
+ # different internalrep when that is not necessary.
# Whether or not there is a string rep - we should not care!
tcl::unsupported::representation $x
} -match glob -result {value is a dict *}
diff --git a/tests/io.test b/tests/io.test
index e26c97f..0ef3422 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -8752,7 +8752,7 @@ test io-73.1 {channel Tcl_Obj SetChannelFromAny} {} {
} {1}
test io-73.2 {channel Tcl_Obj SetChannelFromAny, bug 2407783} -setup {
- # Invalidate intrep of 'channel' Tcl_Obj when transiting between interpreters.
+ # Invalidate internalrep of 'channel' Tcl_Obj when transiting between interpreters.
set f [open [info script] r]
} -body {
interp create foo
diff --git a/tests/lset.test b/tests/lset.test
index 5093369..72d68ec 100644
--- a/tests/lset.test
+++ b/tests/lset.test
@@ -412,7 +412,7 @@ test lset-14.2 {lset, not compiled, flat args, is string rep preserved?} testeva
} "{ { 1 2 } { 3 4 } } { 3 4 }"
testConstraint testobj [llength [info commands testobj]]
-test lset-15.1 {lset: shared intrep [Bug 1677512]} -setup {
+test lset-15.1 {lset: shared internalrep [Bug 1677512]} -setup {
teststringobj set 1 {{1 2} 3}
testobj convert 1 list
testobj duplicate 1 2
diff --git a/tests/proc.test b/tests/proc.test
index ab32567..b87af57 100644
--- a/tests/proc.test
+++ b/tests/proc.test
@@ -325,6 +325,15 @@ test proc-4.8 {TclCreateProc, procbody obj, no leak on multiple iterations} -set
test proc-4.9 {[39fed4dae5] Valid Tcl_PkgPresent return} tcl::test {
tcl::procbodytest::check
} 1
+test proc-4.10 {
+ TclCreateProc, issue a8579d906a28, argument with no name
+} -body {
+ catch {
+ proc p1 [list [list [expr {1 + 2}] default]] {}
+ }
+} -cleanup {
+ catch {rename p1 {}}
+} -result 0
test proc-5.1 {Bytecompiling noop; test for correct argument substitution} -body {
proc p args {} ; # this will be bytecompiled into t
diff --git a/tests/regexp.test b/tests/regexp.test
index c0db137..2737583 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} {
}
unset -nocomplain foo
-
+package require tcltests
testConstraint exec [llength [info commands exec]]
# Used for constraining memory leak tests
diff --git a/tests/string.test b/tests/string.test
index dd8da3f..d5a4815 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -19,6 +19,7 @@ if {"::tcltest" ni [namespace children]} {
::tcltest::loadTestedCommands
catch [list package require -exact tcl::test [info patchlevel]]
+package require tcltests
# Helper commands to test various optimizations, code paths, and special cases.
proc makeByteArray {s} {binary format a* $s}
diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl
index 1ee37d3..f7407b4 100644
--- a/tests/tcltests.tcl
+++ b/tests/tcltests.tcl
@@ -15,6 +15,7 @@ if {[namespace which testdebug] ne {}} {
[testConstraint purify]
}]
}
+testConstraint nodep [info exists tcl_precision]
testConstraint fcopy [llength [info commands fcopy]]
testConstraint fileevent [llength [info commands fileevent]]
testConstraint thread [
diff --git a/tests/var.test b/tests/var.test
index defd743..864bec8 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -1039,7 +1039,7 @@ test var-22.0 {leak in array element unset: Bug a3309d01db} -setup {
array unset A
rename doit {}
} -result 0
-test var-22.1 {leak in localVarName intrep: Bug 80304238ac} -setup {
+test var-22.1 {leak in localVarName internalrep: Bug 80304238ac} -setup {
proc doit {} {
interp create child
child eval {