From 810cb2b29053d84c38a4b8b7e40431137902d002 Mon Sep 17 00:00:00 2001 From: Marco Paland Date: Sun, 24 Jun 2018 13:07:52 +0200 Subject: fix(printf): suppress terminating \0 in printf() output Closes #19 --- test/test_suite.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_suite.cpp b/test/test_suite.cpp index 1251212..53482ab 100644 --- a/test/test_suite.cpp +++ b/test/test_suite.cpp @@ -55,11 +55,12 @@ void _out_fct(char character, void* arg) } - TEST_CASE("printf", "[]" ) { printf_idx = 0U; memset(printf_buffer, 0xCC, 100U); REQUIRE(test::printf("% d", 4232) == 5); + REQUIRE(printf_buffer[5] == (char)0xCC); + printf_buffer[5] = 0; REQUIRE(!strcmp(printf_buffer, " 4232")); } -- cgit v1.2.3