aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-12-01 17:25:36 +1000
committerSteve Bennett <steveb@workware.net.au>2011-12-01 17:35:17 +1000
commit7a4644aeb3f15a984497f52012a0f7eb6c403157 (patch)
treea66278f0a2fa22ed84202fc71d4ebf0bec0afe00
parent4843862936e1dd181a22ecd752dccae7b3d3baef (diff)
downloadjimtcl-7a4644aeb3f15a984497f52012a0f7eb6c403157.zip
jimtcl-7a4644aeb3f15a984497f52012a0f7eb6c403157.tar.gz
jimtcl-7a4644aeb3f15a984497f52012a0f7eb6c403157.tar.bz2
Minor changes for Tcl compatibility
Error messages Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim-subcmd.c4
-rw-r--r--tests/alias.test2
-rw-r--r--tests/filecopy.test4
3 files changed, 5 insertions, 5 deletions
diff --git a/jim-subcmd.c b/jim-subcmd.c
index 446ed19..bd6e050 100644
--- a/jim-subcmd.c
+++ b/jim-subcmd.c
@@ -62,7 +62,7 @@ static void add_cmd_usage(Jim_Interp *interp, const jim_subcmd_type * ct, Jim_Ob
static void set_wrong_args(Jim_Interp *interp, const jim_subcmd_type * command_table, Jim_Obj *subcmd)
{
- Jim_SetResultString(interp, "wrong # args: must be \"", -1);
+ Jim_SetResultString(interp, "wrong # args: should be \"", -1);
add_cmd_usage(interp, command_table, subcmd);
Jim_AppendStrings(interp, Jim_GetResult(interp), "\"", NULL);
}
@@ -159,7 +159,7 @@ const jim_subcmd_type *Jim_ParseSubCmd(Jim_Interp *interp, const jim_subcmd_type
/* Check the number of args */
if (argc - 2 < ct->minargs || (ct->maxargs >= 0 && argc - 2 > ct->maxargs)) {
- Jim_SetResultString(interp, "wrong # args: must be \"", -1);
+ Jim_SetResultString(interp, "wrong # args: should be \"", -1);
/* subcmd */
add_cmd_usage(interp, ct, argv[0]);
Jim_AppendStrings(interp, Jim_GetResult(interp), "\"", NULL);
diff --git a/tests/alias.test b/tests/alias.test
index 201f6e2..57a8d62 100644
--- a/tests/alias.test
+++ b/tests/alias.test
@@ -119,7 +119,7 @@ test local-1.7 "check no reference procs" {
info procs "<reference*"
} {}
-test local-1.8 "local on non-proc" {
+test local-1.8 "local on non-existent command" {
list [catch {local set x blah} msg] $msg
} {1 {not a command: "blah"}}
diff --git a/tests/filecopy.test b/tests/filecopy.test
index c5d097d..853649b 100644
--- a/tests/filecopy.test
+++ b/tests/filecopy.test
@@ -31,11 +31,11 @@ test filecopy-1.5 "Source doesn't exist and can't write to target" {
test filecopy-1.6 "Wrong args" {
list [catch {file copy onearg} msg] $msg
-} {1 {wrong # args: must be "file copy ?-force? source dest"}}
+} {1 {wrong # args: should be "file copy ?-force? source dest"}}
test filecopy-1.7 "Wrong args" {
list [catch {file copy too many args here} msg] $msg
-} {1 {wrong # args: must be "file copy ?-force? source dest"}}
+} {1 {wrong # args: should be "file copy ?-force? source dest"}}
test filecopy-1.8 "Wrong args" {
list [catch {file copy -blah testio.in tempfile} msg] $msg