summaryrefslogtreecommitdiff
path: root/src/test/test-path-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-06 21:29:55 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-06 21:29:55 -0500
commit2b6bf07dd23bb467099d213c97b3875c5e453491 (patch)
tree2127e24f28714b48f6c00e92eaec351bcb57e5d5 /src/test/test-path-util.c
parentf4336098941f94d23f2f6c79bc8d055a0907c392 (diff)
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.
Diffstat (limited to 'src/test/test-path-util.c')
-rw-r--r--src/test/test-path-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index ed3b315a61..bec2a83611 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -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; \