OSDN Git Service

a78bb1d7cecd3642bca8f6c316c2e8a4024734bd
[pf3gnuchains/sourceware.git] / tcl / tests / stack.test
1 # Tests that the stack size is big enough for the application.
2 #
3 # This file contains a collection of tests for one or more of the Tcl
4 # built-in commands.  Sourcing this file into Tcl runs the tests and
5 # generates output for errors.  No output means no errors were found.
6 #
7 # Copyright (c) 1998-1999 by Scriptics Corporation.
8 #
9 # See the file "license.terms" for information on usage and redistribution
10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 #
12 # RCS: @(#) $Id$
13
14 if {[lsearch [namespace children] ::tcltest] == -1} {
15     package require tcltest
16     namespace import -force ::tcltest::*
17 }
18
19 # Note that a failure in this test results in a crash of the executable.
20
21 test stack-1.1 {maxNestingDepth reached on infinite recursion} {
22     proc recurse {} { return [recurse] }
23     catch {recurse} rv
24     rename recurse {}
25     set rv
26 } {too many nested calls to Tcl_EvalObj (infinite loop?)}
27
28 # cleanup
29 ::tcltest::cleanupTests
30 return
31