1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

tests/fmt_print: spice up test

Add also a test for correct behavior of `print()` when the string
doesn't happen to be zero-terminated at the expected position.
This commit is contained in:
Marian Buschsieweke 2022-06-10 10:05:26 +02:00
parent 85cf4aef03
commit d404d93ab4
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -45,7 +45,11 @@ int main(void)
print_str("\n");
print_float(1.2345, 5);
print_str("\n");
printf("%s", "Test ");
/* 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
* print until the terminated zero byte */
print(" not ", 1);
print_str("successful.");
puts("");