diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2005-01-28 13:38:48 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2005-01-28 13:38:48 (GMT) |
| commit | 96f5d67566201abb951bfe2c00d3f8952ceef7a2 (patch) | |
| tree | e25bc6af895515abe50e89129c52e6b5a3c51e21 /generic/tclTest.c | |
| parent | 32752de18dc2d856a3625b8dfcd1f26d8528b554 (diff) | |
| download | tcl-96f5d67566201abb951bfe2c00d3f8952ceef7a2.zip tcl-96f5d67566201abb951bfe2c00d3f8952ceef7a2.tar.gz tcl-96f5d67566201abb951bfe2c00d3f8952ceef7a2.tar.bz2 | |
Added test for [1109484]
Diffstat (limited to 'generic/tclTest.c')
| -rw-r--r-- | generic/tclTest.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index 72c8cef..cb3a314 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.87 2004/12/15 20:44:43 msofer Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.88 2005/01/28 13:38:57 dkf Exp $ */ #define TCL_TEST @@ -2277,9 +2277,14 @@ TestexprlongCmd(clientData, interp, argc, argv) long exprResult; char buf[4 + TCL_INTEGER_SPACE]; int result; - + + if (argc != 2) { + Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], + " expression\"", (char *) NULL); + return TCL_ERROR; + } Tcl_SetResult(interp, "This is a result", TCL_STATIC); - result = Tcl_ExprLong(interp, "4+1", &exprResult); + result = Tcl_ExprLong(interp, argv[1], &exprResult); if (result != TCL_OK) { return result; } |
