summaryrefslogtreecommitdiffstats
path: root/tests/namespace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-07-01 20:14:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-07-01 20:14:14 (GMT)
commit445755f38427241613b3d9209d17beab10076743 (patch)
tree61695be00f75d4e1e079f67f07bc482c8284de42 /tests/namespace.test
parentcb26a29db0b87479d3d6ff6b60448c60f029e547 (diff)
parentf7aa28a9960d172ef84736f3609940c5564d5325 (diff)
downloadtcl-445755f38427241613b3d9209d17beab10076743.zip
tcl-445755f38427241613b3d9209d17beab10076743.tar.gz
tcl-445755f38427241613b3d9209d17beab10076743.tar.bz2
[4402cfa58c] Rework the spell check machinery into something that will not be foiled by value sharing.
Valgrind is not happy with this commit. Likely suspect is the removal of the nsPtr field and checking against it. dkf tried to warn me.
Diffstat (limited to 'tests/namespace.test')
-rw-r--r--tests/namespace.test46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/namespace.test b/tests/namespace.test
index 2ba695a..c433241 100644
--- a/tests/namespace.test
+++ b/tests/namespace.test
@@ -2107,6 +2107,52 @@ test namespace-50.4 {chained ensembles affect error messages} -body {
rename a {}
rename c {}
}
+test namespace-50.5 {[4402cfa58c]} -setup {
+ proc bar {ev} {}
+ proc bingo {xx} {}
+ namespace ensemble create -command launch -map {foo bar event bingo}
+ set result {}
+} -body {
+ catch {launch foo} m; lappend result $m
+ catch {launch ev} m; lappend result $m
+ catch {launch foo} m; lappend result $m
+} -cleanup {
+ rename launch {}
+ rename bingo {}
+ rename bar {}
+} -result {{wrong # args: should be "launch foo ev"} {wrong # args: should be "launch event xx"} {wrong # args: should be "launch foo ev"}}
+test namespace-50.6 {[4402cfa58c]} -setup {
+ proc target {x y} {}
+ namespace ensemble create -command e2 -map {s2 target}
+ namespace ensemble create -command e1 -map {s1 e2}
+ set result {}
+} -body {
+ set s s
+ catch {e1 s1 s2 a} m; lappend result $m
+ catch {e1 $s s2 a} m; lappend result $m
+ catch {e1 s1 $s a} m; lappend result $m
+ catch {e1 $s $s a} m; lappend result $m
+} -cleanup {
+ rename e1 {}
+ rename e2 {}
+ rename target {}
+} -result {{wrong # args: should be "e1 s1 s2 x y"} {wrong # args: should be "e1 s1 s2 x y"} {wrong # args: should be "e1 s1 s2 x y"} {wrong # args: should be "e1 s1 s2 x y"}}
+test namespace-50.7 {[4402cfa58c]} -setup {
+ proc target {x y} {}
+ namespace ensemble create -command e2 -map {s2 target}
+ namespace ensemble create -command e1 -map {s1 e2} -parameters foo
+ set result {}
+} -body {
+ set s s
+ catch {e1 s2 s1 a} m; lappend result $m
+ catch {e1 $s s1 a} m; lappend result $m
+ catch {e1 s2 $s a} m; lappend result $m
+ catch {e1 $s $s a} m; lappend result $m
+} -cleanup {
+ rename e1 {}
+ rename e2 {}
+ rename target {}
+} -result {{wrong # args: should be "e1 s2 s1 x y"} {wrong # args: should be "e1 s2 s1 x y"} {wrong # args: should be "e1 s2 s1 x y"} {wrong # args: should be "e1 s2 s1 x y"}}
test namespace-51.1 {name resolution path control} -body {
namespace eval ::test_ns_1 {