summaryrefslogtreecommitdiffstats
path: root/tests/stack.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stack.test')
-rw-r--r--tests/stack.test10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/stack.test b/tests/stack.test
index 4a349fa..7d7f816 100644
--- a/tests/stack.test
+++ b/tests/stack.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: stack.test,v 1.23 2008/07/13 09:03:36 msofer Exp $
+# RCS: @(#) $Id: stack.test,v 1.24 2008/07/16 00:44:44 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -24,8 +24,14 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
# can still squeak through. A core check is really needed. -- JH
testConstraint minStack2400 1
+testConstraint teststacklimit [llength [info commands teststacklimit]]
+
if {[testConstraint unix]} {
- set stackSize [teststacklimit]
+ if {[testConstraint teststacklimit]} {
+ set stackSize [teststacklimit]
+ } else {
+ set stackSize [exec /bin/sh -c "ulimit -s"]
+ }
if {($stackSize > -1) && ($stackSize < 2400)} {
puts stderr "WARNING: the default application stacksize of $stackSize\
may cause Tcl to\ncrash due to stack overflow before the\