diff options
author | dgp <dgp@users.sourceforge.net> | 2013-09-04 12:45:51 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-09-04 12:45:51 (GMT) |
commit | 0a973a55fed4b9cba1558fc7c93d412665f7063c (patch) | |
tree | 77cfc614d8d1cbf266cafd43cc85cf6b338748ab /generic/tclTest.c | |
parent | f16149f5a641a30843d2bb4e3dd2734e50ecbe14 (diff) | |
download | tcl-0a973a55fed4b9cba1558fc7c93d412665f7063c.zip tcl-0a973a55fed4b9cba1558fc7c93d412665f7063c.tar.gz tcl-0a973a55fed4b9cba1558fc7c93d412665f7063c.tar.bz2 |
Cleaned up test command trying to make valgrind happy.
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r-- | generic/tclTest.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index 96973d7..f121d0d 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -4408,8 +4408,26 @@ TestseterrorcodeCmd( Tcl_SetResult(interp, "too many args", TCL_STATIC); return TCL_ERROR; } - Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], - argv[5], NULL); + switch (argc) { + case 1: + Tcl_SetErrorCode(interp, "NONE", NULL); + break; + case 2: + Tcl_SetErrorCode(interp, argv[1], NULL); + break; + case 3: + Tcl_SetErrorCode(interp, argv[1], argv[2], NULL); + break; + case 4: + Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], NULL); + break; + case 5: + Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], NULL); + break; + case 6: + Tcl_SetErrorCode(interp, argv[1], argv[2], argv[3], argv[4], + argv[5], NULL); + } return TCL_ERROR; } |