diff options
-rw-r--r-- | generic/tclClock.c | 76 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 10 | ||||
-rw-r--r-- | generic/tclFileName.c | 4 | ||||
-rw-r--r-- | generic/tclIOCmd.c | 4 | ||||
-rw-r--r-- | generic/tclLoad.c | 4 | ||||
-rw-r--r-- | generic/tclTest.c | 4 | ||||
-rw-r--r-- | tests/clock.test | 8 | ||||
-rw-r--r-- | tests/exec.test | 6 | ||||
-rw-r--r-- | tests/fileName.test | 8 | ||||
-rw-r--r-- | tests/indexObj.test | 6 | ||||
-rw-r--r-- | tests/regexp.test | 14 | ||||
-rw-r--r-- | tests/regexpComp.test | 12 | ||||
-rw-r--r-- | tests/switch.test | 10 | ||||
-rw-r--r-- | tests/unload.test | 6 |
14 files changed, 86 insertions, 86 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index 68db1a4..d32e786 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.69 2008/07/13 23:15:22 nijtmans Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.70 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -60,7 +60,7 @@ static const int daysInPriorMonths[2][13] = { typedef enum ClockLiteral { LIT__NIL, LIT__DEFAULT_FORMAT, - LIT_BCE, LIT_C, + LIT_BCE, LIT_C, LIT_CANNOT_USE_GMT_AND_TIMEZONE, LIT_CE, LIT_DAYOFMONTH, LIT_DAYOFWEEK, LIT_DAYOFYEAR, @@ -76,7 +76,7 @@ typedef enum ClockLiteral { static const char *const literals[] = { "", "%a %b %d %H:%M:%S %Z %Y", - "BCE", "C", + "BCE", "C", "cannot use -gmt and -timezone in same call", "CE", "dayOfMonth", "dayOfWeek", "dayOfYear", @@ -225,7 +225,7 @@ static const struct ClockCommand clockCommands[] = { { "ParseFormatArgs", ClockParseformatargsObjCmd }, { NULL, NULL } }; - + /* *---------------------------------------------------------------------- * @@ -280,7 +280,7 @@ TclClockInit( ClockDeleteCmdProc); } } - + /* *---------------------------------------------------------------------- * @@ -369,7 +369,7 @@ ClockConvertlocaltoutcObjCmd( } return status; } - + /* *---------------------------------------------------------------------- * @@ -426,7 +426,7 @@ ClockGetdatefieldsObjCmd( return TCL_ERROR; } - /* + /* * fields.seconds could be an unsigned number that overflowed. Make * sure that it isn't. */ @@ -492,7 +492,7 @@ ClockGetdatefieldsObjCmd( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -583,7 +583,7 @@ ClockGetjuliandayfromerayearmonthdayObjCmd ( } return status; } - + /* *---------------------------------------------------------------------- * @@ -676,7 +676,7 @@ ClockGetjuliandayfromerayearweekdayObjCmd ( } return status; } - + /* *---------------------------------------------------------------------- * @@ -724,7 +724,7 @@ ConvertLocalToUTC( return ConvertLocalToUTCUsingTable(interp, fields, rowc, rowv); } } - + /* *---------------------------------------------------------------------- * @@ -800,7 +800,7 @@ ConvertLocalToUTCUsingTable( fields->seconds = fields->localSeconds - fields->tzOffset; return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -882,7 +882,7 @@ ConvertLocalToUTCUsingC( } return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -928,7 +928,7 @@ ConvertUTCToLocal( return ConvertUTCToLocalUsingTable(interp, fields, rowc, rowv); } } - + /* *---------------------------------------------------------------------- * @@ -979,7 +979,7 @@ ConvertUTCToLocalUsingTable( fields->localSeconds = fields->seconds + fields->tzOffset; return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1072,7 +1072,7 @@ ConvertUTCToLocalUsingC( Tcl_IncrRefCount(fields->tzName); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1138,7 +1138,7 @@ LookupLastTransition( } return rowv[l]; } - + /* *---------------------------------------------------------------------- * @@ -1205,7 +1205,7 @@ GetYearWeekDay( fields->dayOfWeek += 7; } } - + /* *---------------------------------------------------------------------- * @@ -1325,7 +1325,7 @@ GetGregorianEraYearDay( } fields->dayOfYear = day + 1; } - + /* *---------------------------------------------------------------------- * @@ -1356,7 +1356,7 @@ GetMonthDay( fields->month = month+1; fields->dayOfMonth = day; } - + /* *---------------------------------------------------------------------- * @@ -1407,7 +1407,7 @@ GetJulianDayFromEraYearWeekDay( fields->julianDay = firstMonday + 7 * (fields->iso8601Week - 1) + fields->dayOfWeek - 1; } - + /* *---------------------------------------------------------------------- * @@ -1508,7 +1508,7 @@ GetJulianDayFromEraYearMonthDay( + ym1o4; } } - + /* *---------------------------------------------------------------------- * @@ -1546,7 +1546,7 @@ IsGregorianLeapYear( return 1; } } - + /* *---------------------------------------------------------------------- * @@ -1572,7 +1572,7 @@ WeekdayOnOrBefore( } return julianDay - ((julianDay - k) % 7); } - + /* *---------------------------------------------------------------------- * @@ -1616,7 +1616,7 @@ ClockGetenvObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj(varValue, -1)); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -1662,7 +1662,7 @@ ThreadSafeLocalTime( #endif return tmPtr; } - + /*---------------------------------------------------------------------- * * ClockClicksObjCmd -- @@ -1701,13 +1701,13 @@ ClockClicksObjCmd( case 1: break; case 2: - if (Tcl_GetIndexFromObj(interp, objv[1], clicksSwitches, "option", 0, + if (Tcl_GetIndexFromObj(interp, objv[1], clicksSwitches, "switch", 0, &index) != TCL_OK) { return TCL_ERROR; } break; default: - Tcl_WrongNumArgs(interp, 1, objv, "?-option?"); + Tcl_WrongNumArgs(interp, 1, objv, "?-switch?"); return TCL_ERROR; } @@ -1735,7 +1735,7 @@ ClockClicksObjCmd( return TCL_OK; } - + /*---------------------------------------------------------------------- * * ClockMillisecondsObjCmd - @@ -1772,7 +1772,7 @@ ClockMillisecondsObjCmd( now.sec * 1000 + now.usec / 1000)); return TCL_OK; } - + /*---------------------------------------------------------------------- * * ClockMicrosecondsObjCmd - @@ -1809,7 +1809,7 @@ ClockMicrosecondsObjCmd( ((Tcl_WideInt) now.sec * 1000000) + now.usec)); return TCL_OK; } - + /* *----------------------------------------------------------------------------- * @@ -1818,11 +1818,11 @@ ClockMicrosecondsObjCmd( * Parses the arguments for [clock format]. * * Results: - * Returns a standard Tcl result, whose value is a four-element + * Returns a standard Tcl result, whose value is a four-element * list comprising the time format, the locale, and the timezone. * * This function exists because the loop that parses the [clock format] - * options is a known performance "hot spot", and is implemented in an + * options is a known performance "hot spot", and is implemented in an * effort to speed that particular code up. * *----------------------------------------------------------------------------- @@ -1854,7 +1854,7 @@ ClockParseformatargsObjCmd( "-timezone", NULL }; enum optionInd { CLOCK_FORMAT_FORMAT, CLOCK_FORMAT_GMT, CLOCK_FORMAT_LOCALE, - CLOCK_FORMAT_TIMEZONE + CLOCK_FORMAT_TIMEZONE }; int optionIndex; /* Index of an option */ int saw = 0; /* Flag == 1 if option was seen already */ @@ -1927,7 +1927,7 @@ ClockParseformatargsObjCmd( #undef formatObj } - + /*---------------------------------------------------------------------- * * ClockSecondsObjCmd - @@ -1963,7 +1963,7 @@ ClockSecondsObjCmd( Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) now.sec)); return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -2004,7 +2004,7 @@ TzsetIfNecessary(void) } Tcl_MutexUnlock(&clockMutex); } - + /* *---------------------------------------------------------------------- * @@ -2035,7 +2035,7 @@ ClockDeleteCmdProc( ckfree((char*) data); } } - + /* * Local Variables: * mode: c diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index c5a1cb6..f1501ff 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.165 2008/05/30 22:54:27 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.166 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -175,7 +175,7 @@ Tcl_RegexpObjCmd( endOfForLoop: if ((objc - i) < (2 - about)) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"); + "?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"); goto optionError; } objc -= i; @@ -515,7 +515,7 @@ Tcl_RegsubObjCmd( endOfForLoop: if (objc-idx < 3 || objc-idx > 4) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? exp string subSpec ?varName?"); + "?-switch ...? exp string subSpec ?varName?"); optionError: if (startIndex) { Tcl_DecrRefCount(startIndex); @@ -3539,7 +3539,7 @@ Tcl_SwitchObjCmd( finishedOptions: if (objc - i < 2) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? string pattern body ... ?default body?"); + "?-switch ...? string pattern body ?pattern body ...? ?default body?"); return TCL_ERROR; } if (indexVarObj != NULL && mode != OPT_REGEXP) { @@ -3582,7 +3582,7 @@ Tcl_SwitchObjCmd( if (objc < 1) { Tcl_WrongNumArgs(interp, 1, savedObjv, - "?switches? string {pattern body ... ?default body?}"); + "?-switch ...? string {pattern body ?pattern body ...? ?default body?}"); return TCL_ERROR; } objv = listv; diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 723b993..ce2ee53 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.88 2008/05/02 20:02:39 patthoyts Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.89 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -1300,7 +1300,7 @@ Tcl_GlobObjCmd( endOfForLoop: if (objc - i < 1) { - Tcl_WrongNumArgs(interp, 1, objv, "?switches? name ?name ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "?-switch ...? name ?name ...?"); return TCL_ERROR; } if ((globFlags & TCL_GLOBMODE_TAILS) && (pathOrDir == NULL)) { diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index b24b856..57b289b 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOCmd.c,v 1.56 2008/07/21 21:02:17 ferrieux Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.57 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -873,7 +873,7 @@ Tcl_ExecObjCmd( } } if (objc <= skip) { - Tcl_WrongNumArgs(interp, 1, objv, "?switches? arg ?arg ...?"); + Tcl_WrongNumArgs(interp, 1, objv, "?-switch ...? arg ?arg ...?"); return TCL_ERROR; } diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 7ed2ee7..6c1c483 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.17 2008/05/30 22:54:29 dkf Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.18 2008/07/21 21:25:21 nijtmans Exp $ */ #include "tclInt.h" @@ -549,7 +549,7 @@ Tcl_UnloadObjCmd( endOfForLoop: if ((objc-i < 1) || (objc-i > 3)) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? fileName ?packageName? ?interp?"); + "?-switch ...? fileName ?packageName? ?interp?"); return TCL_ERROR; } if (Tcl_FSConvertToPathType(interp, objv[i]) != TCL_OK) { diff --git a/generic/tclTest.c b/generic/tclTest.c index ec7eb65..3d6e2fb 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.116 2008/07/19 22:50:41 nijtmans Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.117 2008/07/21 21:25:21 nijtmans Exp $ */ #define TCL_TEST @@ -3672,7 +3672,7 @@ TestregexpObjCmd( endOfForLoop: if (objc - i < hasxflags + 2 - about) { Tcl_WrongNumArgs(interp, 1, objv, - "?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"); + "?-switch ...? exp string ?matchVar? ?subMatchVar ...?"); return TCL_ERROR; } objc -= i; diff --git a/tests/clock.test b/tests/clock.test index 3d0f62d..a2c0fda 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: clock.test,v 1.85 2008/06/17 02:16:07 kennykb Exp $ +# RCS: @(#) $Id: clock.test,v 1.86 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35454,7 +35454,7 @@ test clock-33.2 {clock clicks tests} { } {1} test clock-33.3 {clock clicks tests} { list [catch {clock clicks foo} msg] $msg -} {1 {bad option "foo": must be -milliseconds or -microseconds}} +} {1 {bad switch "foo": must be -milliseconds or -microseconds}} test clock-33.4 {clock clicks tests} { expr [clock clicks -milliseconds]+1 concat {} @@ -35489,10 +35489,10 @@ test clock-33.5a {clock tests, millisecond timing test} { } {ok} test clock-33.6 {clock clicks, milli with too much abbreviation} { list [catch { clock clicks ? } msg] $msg -} {1 {bad option "?": must be -milliseconds or -microseconds}} +} {1 {bad switch "?": must be -milliseconds or -microseconds}} test clock-33.7 {clock clicks, milli with too much abbreviation} { list [catch { clock clicks - } msg] $msg -} {1 {ambiguous option "-": must be -milliseconds or -microseconds}} +} {1 {ambiguous switch "-": must be -milliseconds or -microseconds}} test clock-33.8 {clock clicks test, microsecond timing test} { # This test can fail on a system that is so heavily loaded that diff --git a/tests/exec.test b/tests/exec.test index d3e3e35..e8b0e66 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: exec.test,v 1.30 2008/07/19 16:20:17 dkf Exp $ +# RCS: @(#) $Id: exec.test,v 1.31 2008/07/21 21:25:21 nijtmans Exp $ package require tcltest 2 namespace import -force ::tcltest::* @@ -364,7 +364,7 @@ err} test exec-10.1 {errors in exec invocation} -constraints {exec} -body { exec -} -returnCodes error -result {wrong # args: should be "exec ?switches? arg ?arg ...?"} +} -returnCodes error -result {wrong # args: should be "exec ?-switch ...? arg ?arg ...?"} test exec-10.2 {errors in exec invocation} -constraints {exec} -body { exec | cat } -returnCodes error -result {illegal use of | or |& in command} @@ -539,7 +539,7 @@ test exec-14.1 {-keepnewline switch} {exec} { } "foo\n" test exec-14.2 {-keepnewline switch} -constraints {exec} -body { exec -keepnewline -} -returnCodes error -result {wrong # args: should be "exec ?switches? arg ?arg ...?"} +} -returnCodes error -result {wrong # args: should be "exec ?-switch ...? arg ?arg ...?"} test exec-14.3 {unknown switch} -constraints {exec} -body { exec -gorp } -returnCodes error -result {bad switch "-gorp": must be -ignorestderr, -keepnewline, or --} diff --git a/tests/fileName.test b/tests/fileName.test index b1125de..27cb661 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: fileName.test,v 1.53 2008/07/20 20:24:45 kennykb Exp $ +# RCS: @(#) $Id: fileName.test,v 1.54 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -697,16 +697,16 @@ test filename-10.24 {Tcl_TranslateFileName} -body { test filename-11.1 {Tcl_GlobCmd} -returnCodes error -body { glob -} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} test filename-11.2 {Tcl_GlobCmd} -returnCodes error -body { glob -gorp } -result {bad option "-gorp": must be -directory, -join, -nocomplain, -path, -tails, -types, or --} test filename-11.3 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplai -} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} test filename-11.4 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplain -} -result {wrong # args: should be "glob ?switches? name ?name ...?"} +} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} test filename-11.5 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplain * ~xyqrszzz } -result {user "xyqrszzz" doesn't exist} diff --git a/tests/indexObj.test b/tests/indexObj.test index b5a3304..495af3c 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: indexObj.test,v 1.16 2008/07/13 23:15:22 nijtmans Exp $ +# RCS: @(#) $Id: indexObj.test,v 1.17 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -88,8 +88,8 @@ test indexObj-4.1 {free old internal representation} testindexobj { } {2} test indexObj-5.1 {Tcl_WrongNumArgs} testindexobj { - testwrongnumargs 1 "?-option?" mycmd -} "wrong # args: should be \"mycmd ?-option?\"" + testwrongnumargs 1 "?-switch?" mycmd +} "wrong # args: should be \"mycmd ?-switch?\"" test indexObj-5.2 {Tcl_WrongNumArgs} testindexobj { testwrongnumargs 2 "bar" mycmd foo } "wrong # args: should be \"mycmd foo bar\"" diff --git a/tests/regexp.test b/tests/regexp.test index 92b6c6a..b32d027 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.30 2007/12/23 21:29:42 hobbs Exp $ +# RCS: @(#) $Id: regexp.test,v 1.31 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -194,10 +194,10 @@ test regexp-5.5 {exercise cache of compiled expressions} { test regexp-6.1 {regexp errors} { list [catch {regexp a} msg] $msg -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexp-6.2 {regexp errors} { list [catch {regexp -nocase a} msg] $msg -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexp-6.3 {regexp errors} { list [catch {regexp -gorp a} msg] $msg } {1 {bad switch "-gorp": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --}} @@ -354,16 +354,16 @@ test regexp-10.5 {inverse partial newline sensitivity in regsub} { test regexp-11.1 {regsub errors} { list [catch {regsub a b} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.2 {regsub errors} { list [catch {regsub -nocase a b} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.3 {regsub errors} { list [catch {regsub -nocase -all a b} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.4 {regsub errors} { list [catch {regsub a b c d e f} msg] $msg -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexp-11.5 {regsub errors} { list [catch {regsub -gorp a b c} msg] $msg } {1 {bad switch "-gorp": must be -all, -nocase, -expanded, -line, -linestop, -lineanchor, -start, or --}} diff --git a/tests/regexpComp.test b/tests/regexpComp.test index c7a5980..e9c324f 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -259,12 +259,12 @@ test regexpComp-6.1 {regexp errors} { evalInProc { list [catch {regexp a} msg] $msg } -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexpComp-6.2 {regexp errors} { evalInProc { list [catch {regexp -nocase a} msg] $msg } -} {1 {wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} +} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar subMatchVar ...?"}} test regexpComp-6.3 {regexp errors} { evalInProc { list [catch {regexp -gorp a} msg] $msg @@ -505,22 +505,22 @@ test regexpComp-11.1 {regsub errors} { evalInProc { list [catch {regsub a b} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.2 {regsub errors} { evalInProc { list [catch {regsub -nocase a b} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.3 {regsub errors} { evalInProc { list [catch {regsub -nocase -all a b} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.4 {regsub errors} { evalInProc { list [catch {regsub a b c d e f} msg] $msg } -} {1 {wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"}} +} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}} test regexpComp-11.5 {regsub errors} { evalInProc { list [catch {regsub -gorp a b c} msg] $msg diff --git a/tests/switch.test b/tests/switch.test index 9a46191..5164ca4 100644 --- a/tests/switch.test +++ b/tests/switch.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: switch.test,v 1.21 2008/03/21 19:09:13 dkf Exp $ +# RCS: @(#) $Id: switch.test,v 1.22 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -171,7 +171,7 @@ test switch-4.1 {error in executed command} { "switch a a {error "Just a test"} default {subst 1}"}} test switch-4.2 {error: not enough args} -returnCodes error -body { switch -} -result {wrong # args: should be "switch ?switches? string pattern body ... ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} test switch-4.3 {error: pattern with no body} -body { switch a b } -returnCodes error -result {extra switch pattern with no body} @@ -271,16 +271,16 @@ test switch-8.3 {weird body text, variable} { test switch-9.1 {empty pattern/body list} -returnCodes error -body { switch x -} -result {wrong # args: should be "switch ?switches? string pattern body ... ?default body?"} +} -result {wrong # args: should be "switch ?-switch ...? string pattern body ?pattern body ...? ?default body?"} test switch-9.2 {unpaired pattern} -returnCodes error -body { switch -- x } -result {extra switch pattern with no body} test switch-9.3 {empty pattern/body list} -body { switch x {} -} -returnCodes error -result {wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} test switch-9.4 {empty pattern/body list} -body { switch -- x {} -} -returnCodes error -result {wrong # args: should be "switch ?switches? string {pattern body ... ?default body?}"} +} -returnCodes error -result {wrong # args: should be "switch ?-switch ...? string {pattern body ?pattern body ...? ?default body?}"} test switch-9.5 {unpaired pattern} -body { switch x a {} b } -returnCodes error -result {extra switch pattern with no body} diff --git a/tests/unload.test b/tests/unload.test index 761f05c..b61e4cc 100644 --- a/tests/unload.test +++ b/tests/unload.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unload.test,v 1.7 2008/04/23 15:44:38 dkf Exp $ +# RCS: @(#) $Id: unload.test,v 1.8 2008/07/21 21:25:22 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -43,10 +43,10 @@ testConstraint teststaticpkg [llength [info commands teststaticpkg]] # Basic tests: parameter testing... test unload-1.1 {basic errors} -returnCodes error -body { unload -} -result {wrong # args: should be "unload ?switches? fileName ?packageName? ?interp?"} +} -result {wrong # args: should be "unload ?-switch ...? fileName ?packageName? ?interp?"} test unload-1.2 {basic errors} -returnCodes error -body { unload a b c d -} -result {wrong # args: should be "unload ?switches? fileName ?packageName? ?interp?"} +} -result {wrong # args: should be "unload ?-switch ...? fileName ?packageName? ?interp?"} test unload-1.3 {basic errors} -returnCodes error -body { unload a b foobar } -result {could not find interpreter "foobar"} |