summaryrefslogtreecommitdiff
path: root/misc/tst-dirname.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/tst-dirname.c')
-rw-r--r--misc/tst-dirname.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/tst-dirname.c b/misc/tst-dirname.c
index fd24488f4f..e688bd3a42 100644
--- a/misc/tst-dirname.c
+++ b/misc/tst-dirname.c
@@ -24,7 +24,7 @@
#include <string.h>
-int
+static int
test (const char *input, const char *result)
{
int retval;
@@ -45,11 +45,15 @@ main (void)
/* These are the examples given in XPG4.2. */
result |= test ("/usr/lib", "/usr");
- result |= test ("/usr", "/");
+ result |= test ("/usr/", "/");
result |= test ("usr", ".");
result |= test ("/", "/");
result |= test (".", ".");
result |= test ("..", ".");
+ /* Some more tests. */
+ result |= test ("/usr/lib/", "/usr");
+ result |= test ("/usr", "/");
+
return result != 0;
}