aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorD. Bohdan <dbohdan@dbohdan.com>2020-10-14 09:13:29 +0000
committerSteve Bennett <steveb@workware.net.au>2020-10-31 21:06:38 +1000
commitb1ea58221a8f4db03cfdb53f66a5c7917dbc9e58 (patch)
treecbcf13d14c61e28a862191ab6610bfeb54ffec60 /tests
parentfb923fab4f0cf276c336d98692d00df6a943791d (diff)
downloadjimtcl-b1ea58221a8f4db03cfdb53f66a5c7917dbc9e58.zip
jimtcl-b1ea58221a8f4db03cfdb53f66a5c7917dbc9e58.tar.gz
jimtcl-b1ea58221a8f4db03cfdb53f66a5c7917dbc9e58.tar.bz2
core: put space before "..." in "wrong # args" msg
Resolves #173.
Diffstat (limited to 'tests')
-rw-r--r--tests/misc.test5
-rw-r--r--tests/proc-new.test9
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/misc.test b/tests/misc.test
index d99de4a..b69d133 100644
--- a/tests/misc.test
+++ b/tests/misc.test
@@ -541,6 +541,11 @@ test lset-1.1 "lset with bad var" {
catch {lset badvar 1 x}
} 1
+test lset-1.2 "lset error message" {
+ catch lset msg
+ set msg
+} {wrong # args: should be "lset listVar ?index ...? newVal"}
+
test dict-1.1 "dict to string" {
set a [dict create abc \\ def \"]
set x x$a
diff --git a/tests/proc-new.test b/tests/proc-new.test
index 8703748..377eed7 100644
--- a/tests/proc-new.test
+++ b/tests/proc-new.test
@@ -124,4 +124,13 @@ test proc-3.4 "invalid upref in rightargs" {
catch {a B}
} 1
+test proc-3.5 "error message with optional args" {
+ proc a {b args} {
+ return $args
+ }
+ catch a msg
+ set msg
+} {wrong # args: should be "a b ?arg ...?"}
+
+
testreport