9a9b91c940
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
14 lines
288 B
C
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("..", "..");
|
|
}
|