summaryrefslogtreecommitdiffstats
path: root/tests/link.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-21 12:59:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-21 12:59:30 (GMT)
commitaef9317c2b61b05b7e2c172f1cb28a3dc3988829 (patch)
tree6205a7c7efe574d1e320fe1681ea1f171892e320 /tests/link.test
parent9adc1d86b363addf539bedb62a8d19763f14d87c (diff)
downloadtcl-aef9317c2b61b05b7e2c172f1cb28a3dc3988829.zip
tcl-aef9317c2b61b05b7e2c172f1cb28a3dc3988829.tar.gz
tcl-aef9317c2b61b05b7e2c172f1cb28a3dc3988829.tar.bz2
Experimental (partial) fix for [39f6304c2e90549c209cd11a7920dc9921b9f48e|39f6304c2e]: Tcl_LinkVar is not tolerant to minus, plus, dot.
This handled minus and plus only, not other possible errors. Will need a TIP, because the boolean type is extended to consider '-', '+' and 'o' (necessary for being able to type 'on' or 'off') as valid booleans Dot, and integer prefixes (such as 0x) not handled yet, should be handled completely different.
Diffstat (limited to 'tests/link.test')
-rw-r--r--tests/link.test12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/link.test b/tests/link.test
index 00e490c..0ea7cf6 100644
--- a/tests/link.test
+++ b/tests/link.test
@@ -67,14 +67,14 @@ test link-2.2 {writing bad values into variables} -setup {
testlink set 43 1.23 4 - 56785678 64 250 30000 60000 0xbeefbabe 12321 32123 3.25 1231231234
testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list [catch {set int 09a} msg] $msg $int
-} -result {1 {can't set "int": variable must have integer value} 43}
+} -result {1 {can't set "int": variable must have integer or boolean value} 43}
test link-2.3 {writing bad values into variables} -setup {
testlink delete
} -constraints {testlink} -body {
testlink set 43 1.23 4 - 56785678 64 250 30000 60000 0xbeefbabe 12321 32123 3.25 1231231234
testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list [catch {set real 1.x3} msg] $msg $real
-} -result {1 {can't set "real": variable must have real value} 1.23}
+} -result {1 {can't set "real": variable must have real or boolean value} 1.23}
test link-2.4 {writing bad values into variables} -setup {
testlink delete
} -constraints {testlink} -body {
@@ -88,7 +88,7 @@ test link-2.5 {writing bad values into variables} -setup {
testlink set 43 1.23 4 - 56785678 64 250 30000 60000 0xbeefbabe 12321 32123 3.25 1231231234
testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list [catch {set wide gorp} msg] $msg $bool
-} -result {1 {can't set "wide": variable must have integer value} 1}
+} -result {1 {can't set "wide": variable must have integer or boolean value} 1}
test link-3.1 {read-only variables} -constraints {testlink} -setup {
testlink delete
@@ -225,7 +225,7 @@ test link-7.4 {access to linked variables via upvar} -setup {
testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -4 {} {} {} {} {} {} {} {} {} {} {} {} {}
list [catch x msg] $msg $int
-} -result {1 {can't set "y": variable must have integer value} -4}
+} -result {1 {can't set "y": variable must have integer or boolean value} -4}
test link-7.5 {access to linked variables via upvar} -setup {
testlink delete
} -constraints {testlink} -body {
@@ -236,7 +236,7 @@ test link-7.5 {access to linked variables via upvar} -setup {
testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -4 16.75 {} {} {} {} {} {} {} {} {} {} {} {}
list [catch x msg] $msg $real
-} -result {1 {can't set "y": variable must have real value} 16.75}
+} -result {1 {can't set "y": variable must have real or boolean value} 16.75}
test link-7.6 {access to linked variables via upvar} -setup {
testlink delete
} -constraints {testlink} -body {
@@ -258,7 +258,7 @@ test link-7.7 {access to linked variables via upvar} -setup {
testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -4 16.3 1 {} 778899 {} {} {} {} {} {} {} {} {}
list [catch x msg] $msg $wide
-} -result {1 {can't set "y": variable must have integer value} 778899}
+} -result {1 {can't set "y": variable must have integer or boolean value} 778899}
test link-8.1 {Tcl_UpdateLinkedVar procedure} {testlink} {
proc x args {