summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordah <dunnie@gmail.com>2016-12-18 15:04:34 (GMT)
committerdah <dunnie@gmail.com>2016-12-18 15:04:34 (GMT)
commit6127d0ae1c48c00e21584b66a79c21727291ca52 (patch)
tree027c2ded2df229a44ec5a3a89786171eab2e6090 /tests
parent6e4bc775a32492b2994a525aec7ff0183252e0b8 (diff)
downloadtcl-6127d0ae1c48c00e21584b66a79c21727291ca52.zip
tcl-6127d0ae1c48c00e21584b66a79c21727291ca52.tar.gz
tcl-6127d0ae1c48c00e21584b66a79c21727291ca52.tar.bz2
More tests, frame lookup tweak and attempt to take advantage of a branch prediction.
Diffstat (limited to 'tests')
-rw-r--r--tests/proc.test48
1 files changed, 47 insertions, 1 deletions
diff --git a/tests/proc.test b/tests/proc.test
index 537c0ad..5658561 100644
--- a/tests/proc.test
+++ b/tests/proc.test
@@ -490,7 +490,7 @@ test proc-8.8 {Auto argument linking, default for auto-link formal} -body {
}}
} -constraints procbodytest -returnCodes error -cleanup {
catch {rename P {}}
-} -result {procedure "P": formal parameter "*a" is to be a link and can't have a default value}
+} -result {procedure "P": formal parameter "*a" is to be linked and must not have a default value}
test proc-8.9 {Auto argument linking, bad variable} -body {
proc P {*a} {
@@ -501,6 +501,52 @@ test proc-8.9 {Auto argument linking, bad variable} -body {
catch {rename P {}}
} -result {can't access "mumbo::jumbo": parent namespace doesn't exist}
+test proc-8.10 {Auto argument linking, empty link name} -body {
+ proc P {*} {
+ incr {}
+ }
+ apply {{} {
+ P a
+ set a
+ }}
+} -cleanup {
+ rename P {}
+} -result {1}
+
+test proc-8.11 {Auto argument linking, link name consistency} -body {
+ proc P {**a} {
+ incr *a
+ }
+ apply {{} {
+ P a
+ set a
+ }}
+} -cleanup {
+ rename P {}
+} -result {1}
+
+test proc-8.12 {Auto argument linking, info args} -body {
+ proc P {*a b *c} {}
+ info args P
+} -cleanup {
+ rename P {}
+} -result {*a b *c}
+
+test proc-8.13 {Auto argument linking, info locals} -body {
+ proc P {*a b *c} {info locals}
+ P a b c
+} -cleanup {
+ rename P {}
+} -result {*a b *c}
+
+test proc-8.14 {Auto argument linking, linked arg retains value} -body {
+ proc P {*a} {set *a}
+ P a
+} -cleanup {
+ rename P {}
+} -result {a}
+
+
# cleanup
catch {rename p ""}