summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-09-24 19:31:22 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-09-24 19:31:22 (GMT)
commit320d7eee6064ca0dd8cb639bd5be69ba1540090e (patch)
treebb9142d1461d158477e06736af87cceca30ed6fc /tests
parentf07ede6c19ad5eed75e1dcbc9ffed8322eed5c3b (diff)
downloadtcl-320d7eee6064ca0dd8cb639bd5be69ba1540090e.zip
tcl-320d7eee6064ca0dd8cb639bd5be69ba1540090e.tar.gz
tcl-320d7eee6064ca0dd8cb639bd5be69ba1540090e.tar.bz2
TIP #323 IMPLEMENTATION (partial)
* doc/file.n: Revise [file delete] and [file mkdir] to * generic/tclCmdAH.c: accept zero "pathname" arguments (the * generic/tclFCmd.c: no-op case). * tests/cmdAH.test: * tests/fCmd.test:
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdAH.test6
-rw-r--r--tests/fCmd.test14
2 files changed, 12 insertions, 8 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 73a8819..cca533f 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.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: cmdAH.test,v 1.62 2008/09/10 13:50:04 dkf Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.63 2008/09/24 19:31:29 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -1093,6 +1093,10 @@ test cmdAH-23.10 {Tcl_FileObjCmd: mkdir} -setup {
file delete -force $dirA
file delete -force $dirB
} -result {1 1}
+test cmdAH-23.11 {Tcl_FileObjCmd: mkdir} {
+ # Allow zero arguments (TIP 323)
+ file mkdir
+} {}
# mtime
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 78c0270..78be937 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.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: fCmd.test,v 1.64 2008/08/14 00:08:24 das Exp $
+# RCS: @(#) $Id: fCmd.test,v 1.65 2008/09/24 19:31:40 dgp Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -363,9 +363,9 @@ test fCmd-4.16 {TclFileMakeDirsCmd: TclpCreateDirectory succeeds} -setup {
test fCmd-5.1 {TclFileDeleteCmd: FileForceOption fails} -constraints {notRoot} -body {
file delete -xyz
} -returnCodes error -result {bad option "-xyz": should be -force or --}
-test fCmd-5.2 {TclFileDeleteCmd: not enough args} -constraints {notRoot} -body {
+test fCmd-5.2 {TclFileDeleteCmd: accept 0 files (TIP 323)} -body {
file delete -force -force
-} -returnCodes error -result {wrong # args: should be "file delete ?-option value ...? file ?file ...?"}
+} -result {}
test fCmd-5.3 {TclFileDeleteCmd: 1 file} -constraints {notRoot} -setup {
cleanup
} -body {
@@ -1587,12 +1587,12 @@ test fCmd-16.3 {test bad option} -constraints {notRoot} -setup {
} -cleanup {
file delete tfa
} -result {1}
-test fCmd-16.4 {test not enough args} -constraints {notRoot} -body {
+test fCmd-16.4 {accept zero files (TIP 323)} -body {
file delete
-} -returnCodes error -match glob -result "wrong \# args: should be *"
-test fCmd-16.5 {test not enough args with options} -constraints {notRoot} -body {
+} -result {}
+test fCmd-16.5 {accept zero files (TIP 323)} -body {
file delete --
-} -returnCodes error -match glob -result "wrong \# args: should be *"
+} -result {}
test fCmd-16.6 {delete: source filename translation failing} -setup {
set temp $::env(HOME)
} -constraints {notRoot} -body {