Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/tests/security.test @ 68

Last change on this file since 68 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 933 bytes
Line 
1# security.test --
2#
3# Functionality covered: this file contains a collection of tests for the
4# auto loading and namespaces.
5#
6# Sourcing this file into Tcl runs the tests and generates output for
7# errors. 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# RCS: @(#) $Id: security.test,v 1.6 2004/05/19 13:02:10 dkf Exp $
14
15if {[lsearch [namespace children] ::tcltest] == -1} {
16    package require tcltest
17    namespace import -force ::tcltest::*
18}
19
20# If this proc becomes invoked, then there is a bug
21
22proc BUG {args} {
23    set ::BUG 1
24}
25
26# Check and Clear the bug flag (to do before each test)
27set ::BUG 0
28
29proc CB {} {
30    set ret $::BUG
31    set ::BUG 0
32    return $ret
33}
34
35
36test security-1.1 {tcl_endOfPreviousWord} {
37    catch {tcl_startOfPreviousWord x {[BUG]}}
38    CB
39} 0
40
41# cleanup
42::tcltest::cleanupTests
43return
Note: See TracBrowser for help on using the repository browser.