diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-30 22:20:57 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-12-30 22:20:57 (GMT) |
commit | 7f2a8dd7889a58eefee7a469ef80d29c3619799a (patch) | |
tree | c570d2f38edafbc870de694b2fb3864c85ac8a10 /tests | |
parent | 2e2f8ffea1f149bfc599286750b0bd64a88c4fc2 (diff) | |
download | tcl-7f2a8dd7889a58eefee7a469ef80d29c3619799a.zip tcl-7f2a8dd7889a58eefee7a469ef80d29c3619799a.tar.gz tcl-7f2a8dd7889a58eefee7a469ef80d29c3619799a.tar.bz2 |
[Bug 2923613]: Make the safer [source] handle a [return] at the end of the file
correctly.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/safe.test | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/safe.test b/tests/safe.test index e4e3596..aedc7de 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.6 2009/12/29 13:13:18 dkf Exp $ +# RCS: @(#) $Id: safe.test,v 1.22.4.7 2009/12/30 22:20:57 dkf Exp $ package require Tcl 8.5 @@ -300,6 +300,17 @@ test safe-8.8 {safe source forbids -rsrc} { $msg \ [safe::interpDelete $i] ; } {1 {wrong # args: should be "source ?-encoding E? fileName"} {}} +test safe-8.9 {safe source and return} -setup { + set returnScript [makeFile {return "ok"} return.tcl] + catch {safe::interpDelete $i} +} -body { + safe::interpCreate $i + set token [safe::interpAddToAccessPath $i [file dirname $returnScript]] + $i eval [list source $token/[file tail $returnScript]] +} -cleanup { + catch {safe::interpDelete $i} + removeFile $returnScript +} -result ok test safe-9.1 {safe interps' deleteHook} { set i "a"; |