From a54c80d07bbaa8cb34dd5924d0926ac47e7deded Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 27 Dec 2022 22:31:48 +0100 Subject: libc: fix strncmp --- src/user/app/tests/libc/string.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/user/app/tests/libc') diff --git a/src/user/app/tests/libc/string.c b/src/user/app/tests/libc/string.c index 2e00049..6afe350 100644 --- a/src/user/app/tests/libc/string.c +++ b/src/user/app/tests/libc/string.c @@ -55,6 +55,9 @@ static void test_strcmp(void) { test(0 < strcmp("string", "str")); test(0 != strcmp("stress", "string")); + + test(0 != strncmp("abc", "ab", 3)); + test(0 == strncmp("abc", "ab", 2)); } static void test_strtol(void) { -- cgit v1.2.3