Get rid of our reimplementation of basename

The only problem is that libgen.h #defines basename to point to it's
own broken implementation instead of the GNU one. This can be fixed
by #undefining basename.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2013-12-06 21:29:55 -05:00
parent f433609894
commit 2b6bf07dd2
22 changed files with 55 additions and 66 deletions

View file

@ -50,10 +50,10 @@ static void test_path(void) {
assert_se(is_path("a/b"));
assert_se(!is_path("."));
assert_se(streq(path_get_file_name("./aa/bb/../file.da."), "file.da."));
assert_se(streq(path_get_file_name("/aa///.file"), ".file"));
assert_se(streq(path_get_file_name("/aa///file..."), "file..."));
assert_se(streq(path_get_file_name("file.../"), ""));
assert_se(streq(basename("./aa/bb/../file.da."), "file.da."));
assert_se(streq(basename("/aa///.file"), ".file"));
assert_se(streq(basename("/aa///file..."), "file..."));
assert_se(streq(basename("file.../"), ""));
#define test_parent(x, y) { \
char _cleanup_free_ *z = NULL; \