summaryrefslogtreecommitdiffstats
path: root/tests/libgen_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libgen_test.cpp')
-rw-r--r--tests/libgen_test.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/libgen_test.cpp b/tests/libgen_test.cpp
index e9a5d5c..8a37a3f 100644
--- a/tests/libgen_test.cpp
+++ b/tests/libgen_test.cpp
@@ -19,15 +19,6 @@
#include <errno.h>
#include <gtest/gtest.h>
-static void TestBasename(const char* in, const char* expected_out) {
- char* writable_in = (in != NULL) ? strdup(in) : NULL;
- errno = 0;
- const char* out = basename(&writable_in[0]);
- ASSERT_STREQ(expected_out, out) << in;
- ASSERT_EQ(0, errno) << in;
- free(writable_in);
-}
-
static void TestDirname(const char* in, const char* expected_out) {
char* writable_in = (in != NULL) ? strdup(in) : NULL;
errno = 0;
@@ -37,21 +28,6 @@ static void TestDirname(const char* in, const char* expected_out) {
free(writable_in);
}
-// Do not use basename as the test name, it's defined to another value in glibc
-// so leads to a differently named test on host versus target architectures.
-TEST(libgen, posix_basename) {
- TestBasename(NULL, ".");
- TestBasename("", ".");
- TestBasename("/usr/lib", "lib");
- TestBasename("/usr/", "usr");
- TestBasename("usr", "usr");
- TestBasename("/", "/");
- TestBasename(".", ".");
- TestBasename("..", "..");
- TestBasename("///", "/");
- TestBasename("//usr//lib//", "lib");
-}
-
TEST(libgen, dirname) {
TestDirname(NULL, ".");
TestDirname("", ".");