summaryrefslogtreecommitdiffstats
path: root/tests/link.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-23 11:59:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-23 11:59:05 (GMT)
commitdbd049268f498307121d7fb7a27dafe23d856637 (patch)
treeb85dcf981d04044e55d96f77bb2fe8c4af772fe1 /tests/link.test
parent87a0d0b706167c246ba2a4e61fc7f87b69c3b7a2 (diff)
downloadtcl-dbd049268f498307121d7fb7a27dafe23d856637.zip
tcl-dbd049268f498307121d7fb7a27dafe23d856637.tar.gz
tcl-dbd049268f498307121d7fb7a27dafe23d856637.tar.bz2
Handle other invalid sequences, like "1234e" or "-567e+", that could be the start of a valid real number.
Diffstat (limited to 'tests/link.test')
-rw-r--r--tests/link.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/link.test b/tests/link.test
index 9ff44db..1e29ac5 100644
--- a/tests/link.test
+++ b/tests/link.test
@@ -141,6 +141,27 @@ test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup {
set uwide "0O"
concat [testlink get] | $int $real $bool $string $wide $char $uchar $short $ushort $uint $long $ulong $float $uwide
} -result {0 0.0 0 0 0 0 0 0 0 0 0 0 0.0 0 | 0x 0b 0 0 0O 0X 0B 0O 0x 0b 0o 0X 0B 0O}
+test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup {
+ testlink delete
+} -body {
+ testlink set 43 1.21 4 - 56785678 64 250 30000 60000 0xbaadbeef 12321 32123 3.25 1231231234
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ set int 0
+ set real 5000e
+ set bool 0
+ set string 0
+ set wide 0
+ set char 0
+ set uchar 0
+ set short 0
+ set ushort 0
+ set uint 0
+ set long 0
+ set ulong 0
+ set float -6000e+
+ set uwide 0
+ concat [testlink get] | $int $real $bool $string $wide $char $uchar $short $ushort $uint $long $ulong $float $uwide
+} -result {0 5000.0 0 0 0 0 0 0 0 0 0 0 -6000.0 0 | 0 5000e 0 0 0 0 0 0 0 0 0 0 -6000e+ 0}
test link-3.1 {read-only variables} {testlink} {
testlink delete