unix/coverage: Add test for printing literal % character.

This commit is contained in:
Damien George 2019-05-03 23:21:28 +10:00
parent c2bb451908
commit 906fb89fd7
2 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,7 @@ STATIC mp_obj_t extra_coverage(void) {
mp_printf(&mp_plat_print, "%x\n", 0x80000000); // should print unsigned mp_printf(&mp_plat_print, "%x\n", 0x80000000); // should print unsigned
mp_printf(&mp_plat_print, "%X\n", 0x80000000); // should print unsigned 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, "abc\n%"); // string ends in middle of format specifier
mp_printf(&mp_plat_print, "%%\n"); // literal % character
} }
// GC // GC

View File

@ -13,6 +13,7 @@ false true
80000000 80000000
80000000 80000000
abc abc
%
# GC # GC
0 0
0 0