Skip to content

Commit

Permalink
unix/coverage: Add test for printing literal % character.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgeorge committed May 3, 2019
1 parent c2bb451 commit 906fb89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ports/unix/coverage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, "abc\n%"); // string ends in middle of format specifier
mp_printf(&mp_plat_print, "%%\n"); // literal % character
}

// GC
Expand Down
1 change: 1 addition & 0 deletions tests/unix/extra_coverage.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ false true
80000000
80000000
abc
%
# GC
0
0
Expand Down

0 comments on commit 906fb89

Please sign in to comment.