aboutsummaryrefslogtreecommitdiff
path: root/regtest.tcl
diff options
context:
space:
mode:
authorantirez <antirez>2005-03-08 09:42:02 +0000
committerantirez <antirez>2005-03-08 09:42:02 +0000
commit60213cd191be8156eb011e16e6df823065d56f5b (patch)
tree956ee9fa5b8375b698ab0f66b03d3cf7c99dce79 /regtest.tcl
parent5bf31c1165ac894cc6133c3c69513c5884ba9b59 (diff)
downloadjimtcl-60213cd191be8156eb011e16e6df823065d56f5b.zip
jimtcl-60213cd191be8156eb011e16e6df823065d56f5b.tar.gz
jimtcl-60213cd191be8156eb011e16e6df823065d56f5b.tar.bz2
Applied patch about unset a(x) against non existing 'a' variable
(Clemens Hintze). Dictionary handling code and error messages modified a bit (me).
Diffstat (limited to 'regtest.tcl')
-rw-r--r--regtest.tcl10
1 files changed, 10 insertions, 0 deletions
diff --git a/regtest.tcl b/regtest.tcl
index c1aeac3..a013e3e 100644
--- a/regtest.tcl
+++ b/regtest.tcl
@@ -35,6 +35,16 @@ puts "TEST 4 PASSED"
for {set i 0} {$i < 10} {incr i} {continue}
puts "TEST 5 PASSED"
+# REGTEST 6
+# 07Mar2005 - Unset create variable + dict is using dict syntax sugar at
+# currently non-existing variable
+catch {unset thisvardoesnotexists(thiskeytoo)}
+if {[catch {set thisvardoesnotexists}] == 0} {
+ puts "TEST 6 FAILED - unset created dict for non-existing variable"
+ break
+}
+puts "TEST 6 PASSED"
+
# TAKE THE FOLLOWING puts AS LAST LINE
puts "--- ALL TESTS PASSED ---"