Skip to content

Commit 369e7fd

Browse files
committed
tests/unix/extra_coverage: Add test for mp_vprintf with bad fmt spec.
1 parent adf22c1 commit 369e7fd

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

tests/unix/extra_coverage.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ false true
1111
2147483648
1212
80000000
1313
80000000
14+
abc
1415
# vstr
1516
tests
1617
sts

unix/coverage.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ STATIC mp_obj_t extra_coverage(void) {
154154
mp_printf(&mp_plat_print, "%u\n", 0x80000000); // should print unsigned
155155
mp_printf(&mp_plat_print, "%x\n", 0x80000000); // should print unsigned
156156
mp_printf(&mp_plat_print, "%X\n", 0x80000000); // should print unsigned
157+
mp_printf(&mp_plat_print, "abc\n%"); // string ends in middle of format specifier
157158
}
158159

159160
// vstr

0 commit comments

Comments
 (0)