diff options
| author | dgp@users.sourceforge.net <dgp> | 2013-09-04 12:45:51 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2013-09-04 12:45:51 (GMT) |
| commit | c2724dc05c619eb04d09e834726df65801acab4f (patch) | |
| tree | 77cfc614d8d1cbf266cafd43cc85cf6b338748ab | |
| parent | 0a596070ab87dc60e86eaaa91641e41aa3c227b1 (diff) | |
| download | tcl-c2724dc05c619eb04d09e834726df65801acab4f.zip tcl-c2724dc05c619eb04d09e834726df65801acab4f.tar.gz tcl-c2724dc05c619eb04d09e834726df65801acab4f.tar.bz2 | |
Cleaned up test command trying to make valgrind happy.
| -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; } |
