summaryrefslogtreecommitdiffstats
path: root/tests/zipfs.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-10-07 19:34:52 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-10-07 19:34:52 (GMT)
commit3826a26f8a75540c7f3ff0b45f76498e85486dc9 (patch)
tree1d036fcb65ff3234d69584b2da83d9db937af03f /tests/zipfs.test
parent045e0f533db5ea623b4ea0b519b089b23e2c332e (diff)
downloadtcl-3826a26f8a75540c7f3ff0b45f76498e85486dc9.zip
tcl-3826a26f8a75540c7f3ff0b45f76498e85486dc9.tar.gz
tcl-3826a26f8a75540c7f3ff0b45f76498e85486dc9.tar.bz2
Centralise the de-fanging of standard ensembles in safe interpreters. Doing it right once is easier than repeating hacks...
Diffstat (limited to 'tests/zipfs.test')
-rw-r--r--tests/zipfs.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/zipfs.test b/tests/zipfs.test
index 9d60f8d..631b525 100644
--- a/tests/zipfs.test
+++ b/tests/zipfs.test
@@ -239,6 +239,42 @@ test zipfs-2.13 {zipfs unmount} -constraints {zipfs zipfsencbuf} -body {
catch {file delete -force $tmpdir}
+test zipfs-3.1 {zipfs in child interpreters} -constraints zipfs -setup {
+ set interp [interp create]
+} -body {
+ interp eval $interp {
+ zipfs ?
+ }
+} -returnCodes error -cleanup {
+ interp delete $interp
+} -result {unknown or ambiguous subcommand "?": must be canonical, exists, info, list, lmkimg, lmkzip, mkimg, mkkey, mkzip, mount, mount_data, root, tcl_library, or unmount}
+test zipfs-3.2 {zipfs in child interpreters} -constraints zipfs -setup {
+ set interp [interp create]
+} -body {
+ interp eval $interp {
+ zipfs mkzip
+ }
+} -returnCodes error -cleanup {
+ interp delete $interp
+} -result {wrong # args: should be "zipfs mkzip outfile indir ?strip? ?password?"}
+test zipfs-3.3 {zipfs in child interpreters} -constraints zipfs -setup {
+ set safe [interp create -safe]
+} -body {
+ interp eval $safe {
+ zipfs ?
+ }
+} -returnCodes error -cleanup {
+ interp delete $safe
+} -result {unknown or ambiguous subcommand "?": must be canonical, exists, info, list, lmkimg, lmkzip, mkimg, mkkey, mkzip, mount, mount_data, root, tcl_library, or unmount}
+test zipfs-3.4 {zipfs in child interpreters} -constraints zipfs -setup {
+ set safe [interp create -safe]
+} -body {
+ interp eval $safe {
+ zipfs mkzip
+ }
+} -returnCodes error -cleanup {
+ interp delete $safe
+} -result {not allowed to invoke subcommand mkzip of zipfs}
::tcltest::cleanupTests
return