diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-16 23:44:15 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-16 23:44:15 (GMT) |
commit | 1ccff541fe927c0214548f5717ad58bede0d22eb (patch) | |
tree | 757c645504020bb6ef7a55e3cb435a4dc609e8f0 /tests | |
parent | c09d5284e91311929d7e92c73492076e8a05cd36 (diff) | |
download | tcl-1ccff541fe927c0214548f5717ad58bede0d22eb.zip tcl-1ccff541fe927c0214548f5717ad58bede0d22eb.tar.gz tcl-1ccff541fe927c0214548f5717ad58bede0d22eb.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')
-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 |