summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-04-04 08:05:18 (GMT)
committerhobbs <hobbs>2000-04-04 08:05:18 (GMT)
commit8977ea94f9e8853776ebf09fe56d7be111450019 (patch)
tree00ceac2b3c276f9d6db33da471db0ee5b4fce6bb /tests/namespace.test
parent48e18ca0cc7a2edcc8320b4e33e31faaa768a64a (diff)
downloadtcl-8977ea94f9e8853776ebf09fe56d7be111450019.zip
tcl-8977ea94f9e8853776ebf09fe56d7be111450019.tar.gz
tcl-8977ea94f9e8853776ebf09fe56d7be111450019.tar.bz2
* tests/foreach.test:
* tests/namespace.test: * tests/var.test: Added lsorts to avoid random sorted return problems. [Bug: 2682]
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 7f855c9..3a2ef1e 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: namespace.test,v 1.10 2000/03/27 22:19:14 hobbs Exp $
+# RCS: @(#) $Id: namespace.test,v 1.11 2000/04/04 08:05:19 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -103,8 +103,8 @@ test namespace-6.4 {Tcl_CreateNamespace, trailing ::s in ns name are ignored} {
namespace eval test_ns_2:: {}
namespace eval test_ns_3:: {}
}
- namespace children ::test_ns_1
-} {::test_ns_1::test_ns_2 ::test_ns_1::test_ns_3}
+ lsort [namespace children ::test_ns_1]
+} [lsort {::test_ns_1::test_ns_2 ::test_ns_1::test_ns_3}]
test namespace-6.5 {Tcl_CreateNamespace, relative ns names now only looked up in current ns} {
set trigger {
namespace eval test_ns_2 {namespace current}
@@ -189,10 +189,10 @@ test namespace-8.4 {TclTeardownNamespace, cmds imported from deleted ns go away}
namespace import ::test_ns_export::*
proc p {} {return foo}
}
- list [info commands test_ns_import::*] \
+ list [lsort [info commands test_ns_import::*]] \
[namespace delete test_ns_export] \
[info commands test_ns_import::*]
-} {{::test_ns_import::p ::test_ns_import::cmd1 ::test_ns_import::cmd2} {} ::test_ns_import::p}
+} [list [lsort {::test_ns_import::p ::test_ns_import::cmd1 ::test_ns_import::cmd2}] {} ::test_ns_import::p]
test namespace-9.1 {Tcl_Import, empty import pattern} {
catch {eval namespace delete [namespace children :: test_ns_*]}
@@ -263,12 +263,12 @@ test namespace-10.3 {Tcl_ForgetImport, deletes matching imported cmds} {
namespace import ::test_ns_export::*
proc p {} {return [cmd1 123]}
set l {}
- lappend l [info commands ::test_ns_import::*]
+ lappend l [lsort [info commands ::test_ns_import::*]]
namespace forget ::test_ns_export::cmd1
lappend l [info commands ::test_ns_import::*]
lappend l [catch {cmd1 777} msg] $msg
}
-} {{::test_ns_import::p ::test_ns_import::cmd1} ::test_ns_import::p 1 {invalid command name "cmd1"}}
+} [list [lsort {::test_ns_import::p ::test_ns_import::cmd1}] ::test_ns_import::p 1 {invalid command name "cmd1"}]
test namespace-11.1 {TclGetOriginalCommand, check if not imported cmd} {
catch {eval namespace delete [namespace children :: test_ns_*]}
@@ -326,9 +326,9 @@ test namespace-14.1 {TclGetNamespaceForQualName, absolute names} {
}
namespace eval test_ns_1 {
list $::v $::test_ns_2::v $::test_ns_1::test_ns_2::v \
- [namespace children :: test_ns_*]
+ [lsort [namespace children :: test_ns_*]]
}
-} {10 30 20 {::test_ns_1 ::test_ns_2}}
+} [list 10 30 20 [lsort {::test_ns_1 ::test_ns_2}]]
test namespace-14.2 {TclGetNamespaceForQualName, invalid absolute names} {
namespace eval test_ns_1 {
list [catch {set ::test_ns_777::v} msg] $msg \
@@ -801,8 +801,8 @@ test namespace-26.5 {NamespaceExportCmd, sequence of patterns, patterns accumula
namespace eval test_ns_2 {
namespace import -force ::test_ns_1::*
}
- list [info commands test_ns_2::*] [test_ns_2::cmd3 hello]
-} {{::test_ns_2::cmd1 ::test_ns_2::cmd3} {cmd3: hello}}
+ list [lsort [info commands test_ns_2::*]] [test_ns_2::cmd3 hello]
+} [list [lsort {::test_ns_2::cmd1 ::test_ns_2::cmd3}] {cmd3: hello}]
test namespace-26.6 {NamespaceExportCmd, no patterns means return uniq'ed export list} {
namespace eval test_ns_1 {
namespace export
@@ -815,8 +815,8 @@ test namespace-26.7 {NamespaceExportCmd, -clear resets export list} {
namespace eval test_ns_2 {
namespace import ::test_ns_1::*
}
- list [info commands test_ns_2::*] [test_ns_2::cmd4 hello]
-} {{::test_ns_2::cmd4 ::test_ns_2::cmd1 ::test_ns_2::cmd3} {cmd4: hello}}
+ list [lsort [info commands test_ns_2::*]] [test_ns_2::cmd4 hello]
+} [list [lsort {::test_ns_2::cmd4 ::test_ns_2::cmd1 ::test_ns_2::cmd3}] {cmd4: hello}]
test namespace-27.1 {NamespaceForgetCmd, no args} {
catch {eval namespace delete [namespace children :: test_ns_*]}