Skip to content

Commit 4a57ce1

Browse files
author
jan.nijtmans
committed
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
2 parents 410ed7d + ccd9102 commit 4a57ce1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/compile.test

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,21 @@ proc _ti_gencode {} {
492492
}}
493493
}
494494
test compile-13.2 {TclCompileScript: testing expected nested scripts compilation} -setup {
495+
# dynamic constraint - ensure the stack is large enough on this box for this test:
496+
if {
497+
[testConstraint unix] &&
498+
![catch { exec sh -c {ulimit -s} } stsz] &&
499+
$stsz ne "unlimited" && $stsz <= 2048
500+
} {
501+
tcltest::Skip "too small stack limit ($stsz <= 2048)"
502+
}
495503
_ti_gencode
496504
interp recursionlimit ti [expr {10000+50}]
497505
ti eval {set result {}}
498506
} -body {
499507
# Test different compilation variants (instructions evalStk, invokeStk, etc),
500508
# with 1500 (1000 in debug) nested scripts (bodies). If you get SO/SF exceptions on some low-stack
501-
# boxes or systems, please don't decrease it (either provide a constraint)
509+
# boxes or systems, please don't decrease it (either provide new or extend a constraint above)
502510
ti eval {foreach cmd {eval "if 1" try catch} {
503511
set c [gencode [expr {[tcl::build-info debug] ? 1500 : 1000}] $cmd]
504512
if 1 $c

tests/encoding.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ test encoding-15.32 {UtfToUtfProc CESU-8 [2f22a7364d]} -body {
470470
encoding convertto cesu-8 \U1f600
471471
} -result \xED\xA0\xBD\xED\xB8\x80
472472
test encoding-15.33 {UtfToUtfProc CESU-8 [63325009a8]} -body {
473-
encoding convertto utf-8 \u0400
473+
encoding convertto cesu-8 \u0400
474474
} -result \xD0\x80
475475

476476
test encoding-16.1 {Utf16ToUtfProc} -body {

0 commit comments

Comments
 (0)