Files
KirkOS/user/include/mlibc/tests/glibc/gnu-basename.c
T
kaguya 9a9b91c940 user: implement mlibc as the libc, finally.
It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-05-02 03:31:49 -04:00

14 lines
288 B
C

#define _GNU_SOURCE
#include <assert.h>
#include <string.h>
#define test_string(x, expectval) assert(strcmp(basename(x), expectval) == 0)
int main() {
test_string("/usr/lib", "lib");
test_string("/usr/", "");
test_string("/", "");
test_string(".", ".");
test_string("..", "..");
}