diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-13 22:02:27 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2008-08-13 22:02:27 (GMT) |
commit | d0122a5130593dd68e1d2ebcda75380f031156d7 (patch) | |
tree | be137cbe6f7b03619a6b699f4423a4f7c227fc71 /tests | |
parent | fce0abd807701f8f0b1cbc8f820d3254efdd7f32 (diff) | |
download | tcl-d0122a5130593dd68e1d2ebcda75380f031156d7.zip tcl-d0122a5130593dd68e1d2ebcda75380f031156d7.tar.gz tcl-d0122a5130593dd68e1d2ebcda75380f031156d7.tar.bz2 |
* tests/nre.test: added test for large {*}-expansion effects
Diffstat (limited to 'tests')
-rw-r--r-- | tests/nre.test | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/nre.test b/tests/nre.test index 28861de..8e98991 100644 --- a/tests/nre.test +++ b/tests/nre.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: nre.test,v 1.2 2008/08/04 15:32:40 msofer Exp $ +# RCS: @(#) $Id: nre.test,v 1.3 2008/08/13 22:02:27 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -236,6 +236,22 @@ test nre-7.5 {[foreach] is not recursive} -constraints {knownbug} -setup { unset abs } -result {{0 2 2 0} 0} +test nre-8.1 {nre and {*}} -body { + # force an expansion that grows the evaluation stack, check that nre + # adapts the bottomPtr. This crashes on failure. + + proc inner {} { + set long [lrepeat 1000000 1] + list {*}$long + } + proc outer {} inner + lrange [outer] 0 2 +} -cleanup { + rename inner {} + rename outer {} +} -result {1 1 1} + + # # Basic TclOO tests # |