summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-09-14 21:26:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-09-14 21:26:38 (GMT)
commit4a57ce1c15fbc1f2d404789e92eaf084d897e4b8 (patch)
treeb11ce2eb8518288a09891f71319374b4093cb34d
parent410ed7df4c85eb9b7afeada775839f49c61be175 (diff)
parentccd91024213075307a8b1285eb9dfd374b14f09d (diff)
downloadtcl-4a57ce1c15fbc1f2d404789e92eaf084d897e4b8.zip
tcl-4a57ce1c15fbc1f2d404789e92eaf084d897e4b8.tar.gz
tcl-4a57ce1c15fbc1f2d404789e92eaf084d897e4b8.tar.bz2
compile-13.2: added dynamic constraint for unix boxes (avoid SO for small stack limit) - ensure the stack is large enough for this test (larger than 2048)
Update testcase
-rw-r--r--tests/compile.test10
-rw-r--r--tests/encoding.test2
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/compile.test b/tests/compile.test
index 72eef5e..3e49bb3 100644
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -492,13 +492,21 @@ proc _ti_gencode {} {
}}
}
test compile-13.2 {TclCompileScript: testing expected nested scripts compilation} -setup {
+ # dynamic constraint - ensure the stack is large enough on this box for this test:
+ if {
+ [testConstraint unix] &&
+ ![catch { exec sh -c {ulimit -s} } stsz] &&
+ $stsz ne "unlimited" && $stsz <= 2048
+ } {
+ tcltest::Skip "too small stack limit ($stsz <= 2048)"
+ }
_ti_gencode
interp recursionlimit ti [expr {10000+50}]
ti eval {set result {}}
} -body {
# Test different compilation variants (instructions evalStk, invokeStk, etc),
# with 1500 (1000 in debug) nested scripts (bodies). If you get SO/SF exceptions on some low-stack
- # boxes or systems, please don't decrease it (either provide a constraint)
+ # boxes or systems, please don't decrease it (either provide new or extend a constraint above)
ti eval {foreach cmd {eval "if 1" try catch} {
set c [gencode [expr {[tcl::build-info debug] ? 1500 : 1000}] $cmd]
if 1 $c
diff --git a/tests/encoding.test b/tests/encoding.test
index ecddab4..73f7998 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -470,7 +470,7 @@ test encoding-15.32 {UtfToUtfProc CESU-8 [2f22a7364d]} -body {
encoding convertto cesu-8 \U1f600
} -result \xED\xA0\xBD\xED\xB8\x80
test encoding-15.33 {UtfToUtfProc CESU-8 [63325009a8]} -body {
- encoding convertto utf-8 \u0400
+ encoding convertto cesu-8 \u0400
} -result \xD0\x80
test encoding-16.1 {Utf16ToUtfProc} -body {