diff options
author | dgp <dgp@users.sourceforge.net> | 2013-02-25 14:55:17 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-02-25 14:55:17 (GMT) |
commit | 1f5b1659347a5cb0b2f887b5f3b8c5e9221e3997 (patch) | |
tree | 9455396a4e9d2cd847e2d897472613c4b1b8f072 | |
parent | ca5848b9fa59cb04251c5ab99327e8572cdab06d (diff) | |
parent | 597760fa003d1d510853e15a4c74b3ffd70b3e98 (diff) | |
download | tcl-1f5b1659347a5cb0b2f887b5f3b8c5e9221e3997.zip tcl-1f5b1659347a5cb0b2f887b5f3b8c5e9221e3997.tar.gz tcl-1f5b1659347a5cb0b2f887b5f3b8c5e9221e3997.tar.bz2 |
3605719,3605720 Test independence. Thanks Rolf Ade for patches.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tests/assocd.test | 22 | ||||
-rw-r--r-- | tests/basic.test | 14 |
3 files changed, 31 insertions, 10 deletions
@@ -1,3 +1,8 @@ +2013-02-25 Don Porter <dgp@users.sourceforge.net> + + * tests/assocd.test: [Bugs 3605719,3605720] Test independence. + * tests/basic.test: Thanks Rolf Ade for patches. + 2013-02-23 Jan Nijtmans <nijtmans@users.sf.net> * compat/fake-rfc2553.c: [Bug 3599194]: compat/fake-rfc2553.c is diff --git a/tests/assocd.test b/tests/assocd.test index b543c64..edf55c4 100644 --- a/tests/assocd.test +++ b/tests/assocd.test @@ -34,15 +34,21 @@ test assocd-1.4 {testing setting assoc data} testsetassocdata { testsetassocdata abc "abc d e f" } "" -test assocd-2.1 {testing getting assoc data} testgetassocdata { - testgetassocdata a -} 2 -test assocd-2.2 {testing getting assoc data} testgetassocdata { - testgetassocdata 123 -} 456 -test assocd-2.3 {testing getting assoc data} testgetassocdata { +test assocd-2.1 {testing getting assoc data} -setup { + testsetassocdata a 2 +} -constraints {testgetassocdata} -body { + testgetassocdata a +} -result 2 +test assocd-2.2 {testing getting assoc data} -setup { + testsetassocdata 123 456 +} -constraints {testgetassocdata} -body { + testgetassocdata 123 +} -result 456 +test assocd-2.3 {testing getting assoc data} -setup { + testsetassocdata abc "abc d e f" +} -constraints {testgetassocdata} -body { testgetassocdata abc -} {abc d e f} +} -result "abc d e f" test assocd-2.4 {testing getting assoc data} testgetassocdata { testgetassocdata xxx } "" diff --git a/tests/basic.test b/tests/basic.test index ccf26cc..1a0037c 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -267,14 +267,24 @@ test basic-18.4 {TclRenameCommand, bad new name} { } rename test_ns_basic::p :::george::martha } {} -test basic-18.5 {TclRenameCommand, new name must not already exist} { +test basic-18.5 {TclRenameCommand, new name must not already exist} -setup { + if {![llength [info commands :::george::martha]]} { + catch {namespace delete {*}[namespace children :: test_ns_*]} + namespace eval test_ns_basic { + proc p {} { + return "p in [namespace current]" + } + } + rename test_ns_basic::p :::george::martha + } +} -body { namespace eval test_ns_basic { proc q {} { return 42 } } list [catch {rename test_ns_basic::q :::george::martha} msg] $msg -} {1 {can't rename to ":::george::martha": command already exists}} +} -result {1 {can't rename to ":::george::martha": command already exists}} test basic-18.6 {TclRenameCommand, check for command shadowing by newly renamed cmd} { catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename p ""} |