user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#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("..", "..");
|
||||
}
|
||||
Reference in New Issue
Block a user