Index: tests/contains.test =================================================================== diff -u -r3d4cb79342d1f74cdcc39d6d8b87e9c475f2706a -ra16377a1a6ba5a51fa50b775312c066f3ba5e8fc --- tests/contains.test (.../contains.test) (revision 3d4cb79342d1f74cdcc39d6d8b87e9c475f2706a) +++ tests/contains.test (.../contains.test) (revision a16377a1a6ba5a51fa50b775312c066f3ba5e8fc) @@ -1,5 +1,10 @@ # -*- Tcl -*- package require nx + +# +# Intentionally, we do not want to make a "namespace import" in this +# test file. +# namespace path nx # Don't use test, since both, package test and contains redefine "new", @@ -50,23 +55,28 @@ Tree create 1.3 -label 1.3 }] - - # # Test resolving next without namespace import/path # namespace path "" -# make sure, we have no next defined +# make sure, we have no "::next" defined or globally imported ? {info command ::next} "" nx::Class create C { - :public method foo {} {puts "call next";next}; + :public method foo {} {next; return 12} :create c1 } -? {c1 foo} "" -? {c1 foo} "" +? {c1 foo} 12 +? {c1 foo} 12 +C create c2 { + set :s [self] + set :c [current] + :public method bar {} {return "[set :s]-[set :c]"} +} +? {c2 bar} "::c2-::c2" + # Test resolving of implicit namespaces in relationcmds (here # superclass) in the nx namespace. namespace path ""