Added some dirname and basename tests to ensure that trailing slashes are ignored.
diff --git a/tests/t00-core.c b/tests/t00-core.c
index c8a9f06..216a198 100644
--- a/tests/t00-core.c
+++ b/tests/t00-core.c
@@ -78,7 +78,11 @@ BEGIN_TEST("strutil", dirname)
DIRNAME_TEST("/usr", "/");
DIRNAME_TEST("/usr/", "/");
DIRNAME_TEST("/usr/lib", "/usr");
+ DIRNAME_TEST("/usr/lib/", "/usr");
+ DIRNAME_TEST("/usr/lib//", "/usr");
DIRNAME_TEST("usr/lib", "usr");
+ DIRNAME_TEST("usr/lib/", "usr");
+ DIRNAME_TEST("usr/lib//", "usr");
DIRNAME_TEST(".git/", ".");
#undef DIRNAME_TEST
@@ -103,6 +107,7 @@ BEGIN_TEST("strutil", basename)
BASENAME_TEST("/usr", "usr");
BASENAME_TEST("/usr/", "usr");
BASENAME_TEST("/usr/lib", "lib");
+ BASENAME_TEST("/usr/lib//", "lib");
BASENAME_TEST("usr/lib", "lib");
#undef BASENAME_TEST