summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-10-02 19:35:34 +0200
committerAnton Kling <anton@kling.gg>2024-10-02 19:35:34 +0200
commit9902f9a2b6c5030000e220841b5868158a0bc05d (patch)
tree6ffe9b67cf3cb84bac962509d6850963e7a83014
parent4f52e561379d3328fd3d8508da8b72c44cf542a4 (diff)
test: Fix incorrect test
-rw-r--r--userland/test/test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/userland/test/test.c b/userland/test/test.c
index 1bebee7..6df5a5a 100644
--- a/userland/test/test.c
+++ b/userland/test/test.c
@@ -641,11 +641,9 @@ void printf_test(void) {
char out_buffer[100];
memset(out_buffer, 'A', 100);
assert(5 == snprintf(out_buffer, 5, "hello"));
- memcmp("helloAAAAA", out_buffer, 10);
+ assert(0 == memcmp("hell\0AAAAA", out_buffer, 10));
assert(10 == snprintf(out_buffer, 5, "hellofoooo"));
- memcmp("helloAAAAA", out_buffer, 10);
- assert(10 == snprintf(out_buffer, 10, "hellofoooo"));
- memcmp("hellofoookAA", out_buffer, 12);
+ assert(0 == memcmp("hell\0AAAAA", out_buffer, 10));
}
dbgln("printf TEST PASSED");
}