diff options
author | dgp <dgp@users.sourceforge.net> | 2016-07-01 20:14:14 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-07-01 20:14:14 (GMT) |
commit | 1481e6f3daec8e1ad34ee1bc0544222670c890f5 (patch) | |
tree | 61695be00f75d4e1e079f67f07bc482c8284de42 /tests | |
parent | 38e85a2dbe88be11991f14a59ef71dcd65d5ad05 (diff) | |
parent | 42c2792287c6b609265be758ddb3779e40aa350f (diff) | |
download | tcl-1481e6f3daec8e1ad34ee1bc0544222670c890f5.zip tcl-1481e6f3daec8e1ad34ee1bc0544222670c890f5.tar.gz tcl-1481e6f3daec8e1ad34ee1bc0544222670c890f5.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')
-rw-r--r-- | tests/namespace.test | 46 |
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 { |