summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-01-28 13:38:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-01-28 13:38:48 (GMT)
commite54506c166bdadcc0f3e5d2b2ff50547ca772565 (patch)
treee25bc6af895515abe50e89129c52e6b5a3c51e21 /generic
parenteba80ac0e1a2b6854d25b4b3522a5aeeb26a4725 (diff)
downloadtcl-e54506c166bdadcc0f3e5d2b2ff50547ca772565.zip
tcl-e54506c166bdadcc0f3e5d2b2ff50547ca772565.tar.gz
tcl-e54506c166bdadcc0f3e5d2b2ff50547ca772565.tar.bz2
Added test for [1109484]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclTest.c11
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;
}