sl@0: # security.test -- sl@0: # sl@0: # Functionality covered: this file contains a collection of tests for the sl@0: # auto loading and namespaces. sl@0: # sl@0: # Sourcing this file into Tcl runs the tests and generates output for sl@0: # errors. No output means no errors were found. sl@0: # sl@0: # Copyright (c) 1997 Sun Microsystems, Inc. sl@0: # Copyright (c) 1998-1999 by Scriptics Corporation. sl@0: # All rights reserved. sl@0: # sl@0: # RCS: @(#) $Id: security.test,v 1.5 2000/04/10 17:19:04 ericm Exp $ sl@0: sl@0: if {[lsearch [namespace children] ::tcltest] == -1} { sl@0: package require tcltest sl@0: namespace import -force ::tcltest::* sl@0: } sl@0: sl@0: # If this proc becomes invoked, then there is a bug sl@0: sl@0: proc BUG {args} { sl@0: set ::BUG 1 sl@0: } sl@0: sl@0: # Check and Clear the bug flag (to do before each test) sl@0: set ::BUG 0 sl@0: sl@0: proc CB {} { sl@0: set ret $::BUG sl@0: set ::BUG 0 sl@0: return $ret sl@0: } sl@0: sl@0: sl@0: test sec-1.1 {tcl_endOfPreviousWord} { sl@0: catch {tcl_startOfPreviousWord x {[BUG]}} sl@0: CB sl@0: } 0 sl@0: sl@0: # cleanup sl@0: ::tcltest::cleanupTests sl@0: return sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: