diff options
Diffstat (limited to 'tests/namespace.test')
-rw-r--r-- | tests/namespace.test | 26 |
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_*]} |