summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-01-15 11:41:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-01-15 11:41:56 (GMT)
commit8e6fe27ecc17a62ff9292d3dbbad2534fad0a7d3 (patch)
treefecb46763fad2e68630ebaaed7df71b18999c0e6 /tests
parent34c238c1527a291d4d61f064dc9920e2b9bc51e0 (diff)
parent244885a03e8d66f5500058eaf820d6b47f292007 (diff)
downloadtcl-8e6fe27ecc17a62ff9292d3dbbad2534fad0a7d3.zip
tcl-8e6fe27ecc17a62ff9292d3dbbad2534fad0a7d3.tar.gz
tcl-8e6fe27ecc17a62ff9292d3dbbad2534fad0a7d3.tar.bz2
merge core-8-branch
Diffstat (limited to 'tests')
-rw-r--r--tests/basic.test10
-rw-r--r--tests/namespace.test13
-rw-r--r--tests/oo.test13
-rw-r--r--tests/safe.test8
-rw-r--r--tests/string.test4
5 files changed, 38 insertions, 10 deletions
diff --git a/tests/basic.test b/tests/basic.test
index 7819241..d47613a 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -984,6 +984,16 @@ test basic-49.2 {Tcl_EvalEx: verify TCL_EVAL_GLOBAL operation} testevalex {
set ::context
} {global}
+test basic-50.1 {[586e71dce4] EvalObjv level #0 exception handling} -setup {
+ interp create slave
+ interp alias {} foo slave return
+} -body {
+ list [catch foo m] $m
+} -cleanup {
+ unset -nocomplain m
+ interp delete slave
+} -result {0 {}}
+
# Clean up after expand tests
unset noComp l1 l2 constraints
rename l3 {}
diff --git a/tests/namespace.test b/tests/namespace.test
index 9fa9331..b9e6ead 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -196,6 +196,19 @@ test namespace-7.7 {Bug 1655305} -setup {
interp delete slave
} -result {}
+test namespace-7.8 {Bug ba1419303b4c} -setup {
+ namespace eval ns1 {
+ namespace ensemble create
+ }
+
+ trace add command ns1 delete {
+ namespace delete ns1
+ }
+} -body {
+ # No segmentation fault given --enable-symbols=mem.
+ namespace delete ns1
+} -result {}
+
test namespace-8.1 {TclTeardownNamespace, delete global namespace} {
catch {interp delete test_interp}
interp create test_interp
diff --git a/tests/oo.test b/tests/oo.test
index b9c5067..3be5f79 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -47,7 +47,7 @@ test oo-0.2 {basic test of OO's ability to clean up its initial state} {
} {}
test oo-0.3 {basic test of OO's ability to clean up its initial state} -body {
leaktest {
- [oo::object new] destroy
+ [oo::object new] destroy
}
} -constraints memory -result 0
test oo-0.4 {basic test of OO's ability to clean up its initial state} -body {
@@ -131,6 +131,10 @@ test oo-1.4 {basic test of OO functionality} -body {
test oo-1.4.1 {fully-qualified nested name} -body {
oo::object create ::one::two::three
} -result {::one::two::three}
+test oo-1.4.2 {automatic command name has same name as namespace} -body {
+ set obj [oo::object new]
+ expr {[info object namespace $obj] == $obj}
+} -result 1
test oo-1.5 {basic test of OO functionality} -body {
oo::object doesnotexist
} -returnCodes 1 -result {unknown method "doesnotexist": must be create, destroy or new}
@@ -1514,9 +1518,9 @@ test oo-11.6 {
# No segmentation fault
return done
-} -cleanup {
+} -result done -cleanup {
rename obj1 {}
-} -result done
+}
test oo-12.1 {OO: filters} {
oo::class create Aclass
@@ -3891,9 +3895,6 @@ test oo-35.6 {
rename obj {}
} -result done
-
-
-
test oo-36.1 {TIP #470: introspection within oo::define} {
oo::define oo::object self
} ::oo::object
diff --git a/tests/safe.test b/tests/safe.test
index 33ee166..df60de6 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -180,17 +180,17 @@ test safe-6.3 {test safe interpreters knowledge of the world} {
# leaking infos, but they still do...
# high level general test
-test safe-7.1 {tests that everything works at high level} {
+test safe-7.1 {tests that everything works at high level} -body {
set i [safe::interpCreate]
# no error shall occur:
# (because the default access_path shall include 1st level sub dirs so
# package require in a slave works like in the master)
- set v [interp eval $i {package require http 1}]
+ set v [interp eval $i {package require http 2}]
# no error shall occur:
- interp eval $i {http_config}
+ interp eval $i {http::config}
safe::interpDelete $i
set v
-} 1.0
+} -match glob -result 2.*
test safe-7.2 {tests specific path and interpFind/AddToAccessPath} -body {
set i [safe::interpCreate -nostat -nested 1 -accessPath [list [info library]]]
# should not add anything (p0)
diff --git a/tests/string.test b/tests/string.test
index cebaf4c..b75c900 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -24,6 +24,7 @@ catch [list package require -exact Tcltest [info patchlevel]]
testConstraint testobj [expr {[info commands testobj] != {}}]
testConstraint testindexobj [expr {[info commands testindexobj] != {}}]
+testConstraint fullutf [expr {[format %c 0x010000] != "\ufffd"}]
# Used for constraining memory leak tests
testConstraint memory [llength [info commands memory]]
@@ -1288,6 +1289,9 @@ test string-12.22 {string range, shimmering binary/index} {
binary scan $s a* x
string range $s $s end
} 000000001
+test string-12.23 {string range, surrogates, bug [11ae2be95dac9417]} fullutf {
+ list [string range a\U100000b 1 1] [string range a\U100000b 2 2] [string range a\U100000b 3 3]
+} [list \U100000 {} b]
test string-13.1 {string repeat} {
list [catch {string repeat} msg] $msg