diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/glob.n | 4 | ||||
-rw-r--r-- | generic/tclFileName.c | 6 | ||||
-rw-r--r-- | tests/fileName.test | 12 |
4 files changed, 13 insertions, 13 deletions
@@ -2,6 +2,10 @@ TIP #323 IMPLEMENTATION (partial) + * doc/glob.n: Revise [glob] to accept zero patterns. + * generic/tclFileName.c: + * tests fileName.test: + * doc/linsert.n: Revise [linsert] to accept zero elements. * generic/tclCmdIL.c: * tests/linsert.test: @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: glob.n,v 1.22 2007/12/13 15:22:32 dgp Exp $ +'\" RCS: @(#) $Id: glob.n,v 1.23 2008/09/29 16:03:29 dgp Exp $ '\" .so man.macros .TH glob n 8.3 Tcl "Tcl Built-In Commands" @@ -14,7 +14,7 @@ .SH NAME glob \- Return names of files that match patterns .SH SYNOPSIS -\fBglob \fR?\fIswitches\fR? \fIpattern \fR?\fIpattern ...\fR? +\fBglob \fR?\fIswitches\fR? ?\fIpattern ...\fR? .BE .SH DESCRIPTION diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 9ff6c07..0c29459 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.92 2008/09/27 19:47:29 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.93 2008/09/29 16:03:30 dgp Exp $ */ #include "tclInt.h" @@ -1309,10 +1309,6 @@ Tcl_GlobObjCmd( } endOfForLoop: - if (objc - i < 1) { - Tcl_WrongNumArgs(interp, 1, objv, "?-switch ...? name ?name ...?"); - return TCL_ERROR; - } if ((globFlags & TCL_GLOBMODE_TAILS) && (pathOrDir == NULL)) { Tcl_AppendResult(interp, "\"-tails\" must be used with either " diff --git a/tests/fileName.test b/tests/fileName.test index 86a1b23..1d1f3ce 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.56 2008/08/14 13:09:50 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.57 2008/09/29 16:03:30 dgp 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 ?-switch ...? name ?name ...?"} +} -result {no files matched glob patterns ""} 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 { +test filename-11.3 {Tcl_GlobCmd} -body { glob -nocomplai -} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} -test filename-11.4 {Tcl_GlobCmd} -returnCodes error -body { +} -result {} +test filename-11.4 {Tcl_GlobCmd} -body { glob -nocomplain -} -result {wrong # args: should be "glob ?-switch ...? name ?name ...?"} +} -result {} test filename-11.5 {Tcl_GlobCmd} -returnCodes error -body { glob -nocomplain * ~xyqrszzz } -result {user "xyqrszzz" doesn't exist} |