aboutsummaryrefslogtreecommitdiff
path: root/misc/tst-dirname.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-16 07:54:18 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-16 07:54:18 +0000
commit887e7ab6c5a13398e5986c7054235a135e6429f9 (patch)
tree04556d2595001782246223937c3a43c58d4b9f63 /misc/tst-dirname.c
parentbafd15679c55e35440a9fd11069614b43559413c (diff)
downloadglibc-887e7ab6c5a13398e5986c7054235a135e6429f9.zip
glibc-887e7ab6c5a13398e5986c7054235a135e6429f9.tar.gz
glibc-887e7ab6c5a13398e5986c7054235a135e6429f9.tar.bz2
Update.
2000-12-13 Jakub Jelinek <jakub@redhat.com> * misc/efgcvt.c (FCVT_MAXDIG): Define. (FCVT_BUFPTR): New variable. (fcvt): If fcvt_r returns -1 on the static short buffer, try to malloc a sufficiently large one and retry. (free_mem): New function. * misc/qefgcvt.c (FCVT_MAXDIG): Define. * misc/tst-efgcvt.c (fcvt_tests): Add new test. 2000-12-15 Ulrich Drepper <drepper@redhat.com> * misc/dirname.c (dirname): Fix search for second to last slash. 2000-12-13 Andreas Jaeger <aj@suse.de> * misc/tst-dirname.c (main): Fix typo in test to really use the examples from Unix98. Reported by Michael Kerrisk <mtk16@ext.canterbury.ac.nz>.
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 fd24488..e688bd3 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;
}