| 1 |
# security.test -- |
| 2 |
# |
| 3 |
# Functionality covered: this file contains a collection of tests for the auto |
| 4 |
# loading and namespaces. |
| 5 |
# |
| 6 |
# Sourcing this file into Tcl runs the tests and generates output for errors. |
| 7 |
# No output means no errors were found. |
| 8 |
# |
| 9 |
# Copyright (c) 1997 Sun Microsystems, Inc. |
| 10 |
# Copyright (c) 1998-1999 by Scriptics Corporation. |
| 11 |
# All rights reserved. |
| 12 |
|
| 13 |
if {"::tcltest" ni [namespace children]} { |
| 14 |
package require tcltest 2.5 |
| 15 |
namespace import -force ::tcltest::* |
| 16 |
} |
| 17 |
|
| 18 |
# If this proc becomes invoked, then there is a bug |
| 19 |
|
| 20 |
proc BUG {args} { |
| 21 |
set ::BUG 1 |
| 22 |
} |
| 23 |
|
| 24 |
# Check and Clear the bug flag (to do before each test) |
| 25 |
set ::BUG 0 |
| 26 |
|
| 27 |
proc CB {} { |
| 28 |
set ret $::BUG |
| 29 |
set ::BUG 0 |
| 30 |
return $ret |
| 31 |
} |
| 32 |
|
| 33 |
|
| 34 |
test security-1.1 {tcl_endOfPreviousWord} { |
| 35 |
catch {tcl_startOfPreviousWord x {[BUG]}} |
| 36 |
CB |
| 37 |
} 0 |
| 38 |
|
| 39 |
# cleanup |
| 40 |
::tcltest::cleanupTests |
| 41 |
return |
| 42 |
|
| 43 |
# Local Variables: |
| 44 |
# mode: tcl |
| 45 |
# End: |