From fc6205c4f005dcc9d0560cfe1619f022db8ff12f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 13 Jun 2025 17:50:05 +0200 Subject: [PATCH] unix/coverage: Add coverage test for left adjusted print. Signed-off-by: Jeff Epler --- ports/unix/coverage.c | 1 + tests/ports/unix/extra_coverage.py.exp | 1 + 2 files changed, 2 insertions(+) diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c index 9201dab12d..b041141f0f 100644 --- a/ports/unix/coverage.c +++ b/ports/unix/coverage.c @@ -220,6 +220,7 @@ static mp_obj_t extra_coverage(void) { mp_printf(&mp_plat_print, "%X\n", 0x80000000); // should print unsigned mp_printf(&mp_plat_print, "abc\n%"); // string ends in middle of format specifier mp_printf(&mp_plat_print, "%%\n"); // literal % character + mp_printf(&mp_plat_print, ".%-3s.\n", "a"); // left adjust } // GC diff --git a/tests/ports/unix/extra_coverage.py.exp b/tests/ports/unix/extra_coverage.py.exp index 1549168228..3775036bb3 100644 --- a/tests/ports/unix/extra_coverage.py.exp +++ b/tests/ports/unix/extra_coverage.py.exp @@ -14,6 +14,7 @@ false true 80000000 abc % +.a . # GC 0 0