diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-16 23:31:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-16 23:31:31 (GMT) |
commit | 1bfee26eaac2704c6966f6a5138eb1ea6c60d0c9 (patch) | |
tree | 975d4feb1bef267978e6693d9d311cf84f92890f /tests/safe.test | |
parent | b37c64be40edeb5c2f75e084417fb802058ae239 (diff) | |
download | tcl-1bfee26eaac2704c6966f6a5138eb1ea6c60d0c9.zip tcl-1bfee26eaac2704c6966f6a5138eb1ea6c60d0c9.tar.gz tcl-1bfee26eaac2704c6966f6a5138eb1ea6c60d0c9.tar.bz2 |
Upgrade to Safe Base's handling of [glob] to be more permissive with the
feature set supported, but stricter with path management. It also now has an
error pattern more like the standard [glob] command.
Diffstat (limited to 'tests/safe.test')
-rw-r--r-- | tests/safe.test | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/tests/safe.test b/tests/safe.test index 8c26d20..b7cb611 100644 --- a/tests/safe.test +++ b/tests/safe.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: safe.test,v 1.22.4.3 2009/12/16 14:04:05 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.22.4.4 2009/12/16 23:31:31 dkf Exp $ package require Tcl 8.5 @@ -470,6 +470,41 @@ test safe-12.1 {glob is restricted [Bug 2906841]} -setup { } -returnCodes error -cleanup { safe::interpDelete $i } -result "permission denied" +test safe-12.2 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -directory .. * +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result "permission denied" +test safe-12.3 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -join .. * +} -returnCodes error -cleanup { + safe::interpDelete $i +} -result "permission denied" +test safe-12.4 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -nocomplain ../* +} -cleanup { + safe::interpDelete $i +} -result {} +test safe-12.5 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -directory .. -nocomplain * +} -cleanup { + safe::interpDelete $i +} -result {} +test safe-12.6 {glob is restricted [Bug 2906841]} -setup { + set i [safe::interpCreate] +} -body { + $i eval glob -nocomplain -join .. * +} -cleanup { + safe::interpDelete $i +} -result {} set ::auto_path $saveAutoPath # cleanup |