From 906fb89fd778cb695ba81c871086fe1ce340e681 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 3 May 2019 23:21:28 +1000 Subject: [PATCH] unix/coverage: Add test for printing literal % character. --- ports/unix/coverage.c | 1 + tests/unix/extra_coverage.py.exp | 1 + 2 files changed, 2 insertions(+) diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c index 3c121a1538..538c32d614 100644 --- a/ports/unix/coverage.c +++ b/ports/unix/coverage.c @@ -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 diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index 2e23b24585..6c483f7e54 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -13,6 +13,7 @@ false true 80000000 80000000 abc +% # GC 0 0