ok    1  the motivating case: a string and a number, no print padding
ok    2  a template that is only a segment
ok    3  no segments: the text as is
ok    4  an empty template
ok    5  expressions: 44 and 22.5 (str$ rendering, no padding)
ok    6  built-in functions inside a segment
ok    7  adjacent segments
ok    8  brackets balance inside a segment: a slice
ok    9  single brackets are ordinary text
ok    10  a sprintf$ inside for real formatting
ok    11  array functions inside a segment
ok    12  a boolean renders as 1
ok    13  the template may be a variable (evaluated when f$ runs)
ok    14  the same template later sees the new value (run-time evaluation, cached compile)
ok    15  f$ inside f$
ok    16  a loop variable in a segment
ok    17  a [[ with no ]] raises BADFORMAT
ok    18  an unknown name inside a segment RAISES UNKNOWNVAR (Misterdan-ruled 2026-08-30; it used to become a new variable and render 0)
ok    19  a bad expression inside a segment raises (catchable)
ok    20  f$ works normally after a caught error
ok    21  a bare array name renders as print does: 90  85  77
ok    22  an array EXPRESSION in a segment renders as print does (the eval prefix runs its arraylet first)
ok    23  a string array
ok    24  a scalar function OF an array expression (was a fatal "No error reported" shutdown)
ok    25  filter() in a segment
ok    26  two array-expression segments in one template (two prefix arraylets)
ok    27  the same template later: the prefix re-runs per call, the temp is fresh
ok    28  a ]] inside a double-quoted string does not end the segment
ok    29  a ]] inside a single-quoted string does not end the segment
ok    30  brackets inside quotes do not count for the balance
ok    31  a variable template hit twice renders the current value each time
ok    32  reassigning the template variable (new sid) parses the new text
ok    33  300 distinct templates (cache recycles past 256): the last renders right
ok    34  the very first template still renders after the cache recycled
ok    35  150 fresh eval() texts recycled the whole eval cache: a template OWNS its units, so its slots are untouched
ok    36  two SAME-LENGTH templates never collide in the cache (hits are text-verified)
ok    37  a 6000-char slot result grows the kept buffer and renders whole
ok    38  after nine caught raises inside slots, a nested f$ still renders (render state reset on exception)
ok    39  [[debug_count=]] renders debug_count=42
ok    40  an expression: [[len(pet$)=]] renders len(pet$)=3
ok    41  the text as written, blanks and all
ok    42  a string value is QUOTED, so its blanks show: [[pet$=]] renders pet$="Rex"
ok    43  inside text, an arithmetic expression
ok    44  two in one template
ok    45  an = that is not the last token is still a comparison
ok    46  >= and a quoted = are not the marker
ok    47  [[debug_count >=]] is still an incomplete expression, the whole text in the detail: debug_count >=
ok    48  [[=]]: nothing before the = raises EMPTYSLOT: -4141
ok    49  a routine parameter: amount=7
ok    50  the same template three times (the template cache keeps the extra piece): round round_no=3
ok    51  the blanks show: padded$="  two  "
ok    52  an empty string shows as two quotes: empty$=""
ok    53  a text holding a " and no single quote takes single quotes: quoted$='say "hi"'
ok    54  both quotes: double quotes, the inner ones doubled: both$="say ""it's"""
ok    55  a string expression: pet$ + '!'="Rex!"
ok    56  an ordinary slot stays unquoted, a number never quoted

passed:  56   failed:  0 
