mirror of
https://github.com/micropython/micropython.git
synced 2026-03-11 11:20:17 +01:00
Includes corresponding .exp files because this feature is only available in Python 3.14+. Tests for `!a` conversion specifier and space after `!` are not included because they are not supported by MicroPython. Signed-off-by: Koudai Aono <koxudaxi@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
61 lines
1.6 KiB
Plaintext
61 lines
1.6 KiB
Plaintext
|
|
=== Empty expression tests ===
|
|
Empty expr SyntaxError: malformed f-string
|
|
Whitespace expr SyntaxError: malformed f-string
|
|
Whitespace expr: SyntaxError
|
|
Unterminated expr: SyntaxError
|
|
Whitespace + conversion: SyntaxError
|
|
Long expression: OK
|
|
Template.__str__ with large string: OK
|
|
Basic t-string: OK, result=Template(strings=('', ''), interpolations=(Interpolation('a', 'x', None, ''),))
|
|
Nested interpolations error: SyntaxError: invalid syntax
|
|
Escaped braces result: Template(strings=('', ''), interpolations=(Interpolation(42, 'x', None, '5{literal}'),))
|
|
|
|
=== Expression parser tests ===
|
|
Complex expr: OK
|
|
|
|
=== Lexer edge cases ===
|
|
Lexer NULL case: Tested via heapalloc_fail_tstring.py
|
|
|
|
=== Parser allocation edge cases ===
|
|
Deep nesting: OK
|
|
Very long expression: OK
|
|
|
|
=== Additional parser regression tests ===
|
|
Raw nested spec: "QUOTED"
|
|
Escaped quote spec: "QUOTED"
|
|
Escaped backslash spec: \n
|
|
Nested quoted spec: \
|
|
Literal brace error: SyntaxError: malformed f-string
|
|
Unterminated field: malformed f-string
|
|
|
|
=== Complex expression stress test ===
|
|
60 terms: PASS
|
|
100 terms: PASS
|
|
|
|
=== Stack expansion test (copy_parse_node) ===
|
|
Stack expansion: OK
|
|
|
|
=== Format spec with triple-quoted strings ===
|
|
Triple-quote in format spec: OK
|
|
Triple single-quote in format spec: OK
|
|
|
|
=== Format spec parse error (exception handler) ===
|
|
Parse error handler: OK
|
|
Parse error handler 2: OK
|
|
|
|
=== Large integer in t-string ===
|
|
Large integer: OK
|
|
|
|
=== Bytes in expression ===
|
|
Bytes in expression: OK
|
|
|
|
=== Boolean constants ===
|
|
Boolean constants: OK
|
|
|
|
=== None constant ===
|
|
None constant: OK
|
|
|
|
=== Deep nesting for rule stack expansion ===
|
|
Deep nesting (depth=80): OK
|