From 9dc63f583a6677651185649b49077a1de706658d Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 18 Nov 2022 13:40:59 +0100 Subject: [PATCH] tests/fmt_print: add test for print_bytes_hex() --- tests/fmt_print/main.c | 2 ++ tests/fmt_print/tests/01-run.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/fmt_print/main.c b/tests/fmt_print/main.c index 40964a8176..d32b93e0d1 100644 --- a/tests/fmt_print/main.c +++ b/tests/fmt_print/main.c @@ -45,6 +45,8 @@ int main(void) print_str("\n"); print_float(1.2345, 5); print_str("\n"); + print_bytes_hex("0123456789", 10); + print_str("\n"); /* test mixing of printf() and fmt's print() works fine */ printf("%s", "Test"); /* test fmt's print indeed only honors the length parameter and doesn't diff --git a/tests/fmt_print/tests/01-run.py b/tests/fmt_print/tests/01-run.py index 3f69b950a1..9be3826fe4 100755 --- a/tests/fmt_print/tests/01-run.py +++ b/tests/fmt_print/tests/01-run.py @@ -15,6 +15,7 @@ def testfunc(child): child.expect_exact('18446744073709551615') child.expect_exact('-9223372036854775808') child.expect_exact('1.23450') + child.expect_exact('30313233343536373839') child.expect_exact('Test successful.')