1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# safe.test --
#
# This file contains a collection of tests for safe Tcl, packages loading,
# and using safe interpreters. Sourcing this file into tcl runs the tests
# and generates output for errors. No output means no errors were found.
#
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
#
# 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.1.2.2 1998/09/24 23:59:35 stanton Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
foreach i [interp slaves] {
interp delete $i
}
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# safe.test --
#
# This file contains a collection of tests for safe Tcl, packages loading,
# and using safe interpreters. Sourcing this file into tcl runs the tests
# and generates output for errors. No output means no errors were found.
#
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
#
# 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.1.2.3 1998/11/11 04:08:35 stanton Exp $
if {[string compare test [info procs test]] == 1} then {source defs}
foreach i [interp slaves] {
interp delete $i
}
|
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
}
test safe-6.1 {test safe interpreters knowledge of the world} {
SI; set r [lsort [$I eval {info globals}]]; DI; set r
} {tcl_interactive tcl_patchLevel tcl_platform tcl_version}
test safe-6.2 {test safe interpreters knowledge of the world} {
SI; set r [$I eval {info script}]; DI; set r
} {}
test safe-6.3 {test safe interpreters knowledge of the world} {
SI; set r [lsort [$I eval {array names tcl_platform}]]; DI; set r
} {byteOrder platform}
# more test should be added to check that hostname, nameofexecutable,
# aren't leaking infos, but they still do...
# high level general test
|
|
>
>
>
|
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
}
test safe-6.1 {test safe interpreters knowledge of the world} {
SI; set r [lsort [$I eval {info globals}]]; DI; set r
} {tcl_interactive tcl_patchLevel tcl_platform tcl_version}
test safe-6.2 {test safe interpreters knowledge of the world} {
SI; set r [$I eval {info script}]; DI; set r
} {}
test safe-6.3 {test safe interpreters knowledge of the world} {pcOnly} {
SI; set r [lsort [$I eval {array names tcl_platform}]]; DI; set r
} {byteOrder debug platform}
test safe-6.3 {test safe interpreters knowledge of the world} {macOrUnix} {
SI; set r [lsort [$I eval {array names tcl_platform}]]; DI; set r
} {byteOrder platform}
# more test should be added to check that hostname, nameofexecutable,
# aren't leaking infos, but they still do...
# high level general test
|