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 © 1997 Sun Microsystems, Inc. 10# Copyright © 1998-1999 Scriptics Corporation. 11# All rights reserved. 12 13if {"::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 20proc BUG {args} { 21 set ::BUG 1 22} 23 24# Check and Clear the bug flag (to do before each test) 25set ::BUG 0 26 27proc CB {} { 28 set ret $::BUG 29 set ::BUG 0 30 return $ret 31} 32 33 34test security-1.1 {tcl_endOfPreviousWord} { 35 catch {tcl_startOfPreviousWord x {[BUG]}} 36 CB 37} 0 38 39# cleanup 40::tcltest::cleanupTests 41return 42 43# Local Variables: 44# mode: tcl 45# End: 46