Skip to content

Commit e800e44

Browse files
committed
tests/unix: Add test for printf with %lx format.
1 parent 7cae17f commit e800e44

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

ports/unix/coverage.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ STATIC mp_obj_t extra_coverage(void) {
145145
mp_printf(&mp_plat_print, "%d %+d % d\n", -123, 123, 123); // sign
146146
mp_printf(&mp_plat_print, "%05d\n", -123); // negative number with zero padding
147147
mp_printf(&mp_plat_print, "%ld\n", 123); // long
148+
mp_printf(&mp_plat_print, "%lx\n", 0x123); // long hex
148149
mp_printf(&mp_plat_print, "%X\n", 0x1abcdef); // capital hex
149150
mp_printf(&mp_plat_print, "%.2s %.3s\n", "abc", "abc"); // fixed string precision
150151
mp_printf(&mp_plat_print, "%.*s\n", -1, "abc"); // negative string precision

tests/unix/extra_coverage.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
-123 +123 123
33
-0123
44
123
5+
123
56
1ABCDEF
67
ab abc
78

0 commit comments

Comments
 (0)