diff options
author | dkf <dkf@noemail.net> | 2009-12-16 23:44:15 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2009-12-16 23:44:15 (GMT) |
commit | f45a3f6f787fc56d62aa97a0bc880cdfe7b08f68 (patch) | |
tree | 757c645504020bb6ef7a55e3cb435a4dc609e8f0 /tests | |
parent | d4f67705e8218b7f9565547bd896608a914eec9b (diff) | |
download | tcl-f45a3f6f787fc56d62aa97a0bc880cdfe7b08f68.zip tcl-f45a3f6f787fc56d62aa97a0bc880cdfe7b08f68.tar.gz tcl-f45a3f6f787fc56d62aa97a0bc880cdfe7b08f68.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.
FossilOrigin-Name: 1fb17d6662a743675e29bd1f1423a8067bfc5ce5
Diffstat (limited to 'tests')
-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 c8e170f..3e451d4 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.28 2009/12/03 15:49:22 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.29 2009/12/16 23:44:15 dkf Exp $ package require Tcl 8.5 @@ -498,6 +498,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 |