10000 unix/coverage: Add coverage test for left adjusted print. · sparkfun/micropython@fc6205c · GitHub
[go: up one dir, main page]

Skip to content

Commit fc6205c

Browse files
jeplerdpgeorge
authored andcommitted
unix/coverage: Add coverage test for left adjusted print.
Signed-off-by: Jeff Epler <jepler@gmail.com>
1 parent 1a8f4b2 commit fc6205c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ports/unix/coverage.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ static mp_obj_t extra_coverage(void) {
220220
mp_printf(&mp_plat_print, "%X\n", 0x80000000); // should print unsigned
221221
mp_printf(&mp_plat_print, "abc\n%"); // string ends in middle of format specifier
222222
mp_printf(&mp_plat_print, "%%\n"); // literal % character
223+
mp_printf(&mp_plat_print, ".%-3s.\n", "a"); // left adjust
223224
}
224225

225226
// GC

tests/ports/unix/extra_coverage.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ false true
1414
80000000
1515
abc
1616
%
17+
.a .
1718
# GC
1819
0
1920
0

0 commit comments

Comments
 (0)
0