Skip to content
Tcl Source Code Artifact [d73289866d]
Login

Artifact [d73289866d]

Artifact d73289866de058fbe5c690d4467ed810e2e9d342:


# security.test --
#
# Functionality covered: this file contains a collection of tests for the
# auto loading and namespaces.
#
# Sourcing this file into Tcl runs the tests and generates output for
# errors. No output means no errors were found.
#
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
# RCS: @(#) $Id: security.test,v 1.1.2.2 1999/03/11 18:50:07 hershey Exp $

if {[lsearch [namespace children] ::test] == -1} {
    source [file join [pwd] [file dirname [info script]] defs.tcl]
}

# If this proc becomes invoked, then there is a bug

proc BUG {args} {
  set ::BUG 1
}

# Check and Clear the bug flag (to do before each test)
set ::BUG 0

proc CB {} {
    set ret $::BUG
    set ::BUG 0
    return $ret
}


test sec-1.1 {tcl_endOfPreviousWord} {
    catch {tcl_startOfPreviousWord x {[BUG]}}
    CB
} 0

# cleanup
::test::cleanupTests
return