about summary refs log tree commit diff
path: root/misc/tst-dirname.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-04 08:12:33 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-04 08:12:33 +0000
commitd3d48616c177f32363877eea30b06f79a0f8907d (patch)
tree7ecf81e7a0be372d7e85843b0cf9fbd56407c96d /misc/tst-dirname.c
parent4a10c7fec7babe4b74d070c1d5ff575ca8abe31b (diff)
downloadglibc-d3d48616c177f32363877eea30b06f79a0f8907d.tar.gz
glibc-d3d48616c177f32363877eea30b06f79a0f8907d.tar.xz
glibc-d3d48616c177f32363877eea30b06f79a0f8907d.zip
Update.
2002-04-04  Ulrich Drepper  <drepper@redhat.com>

	* misc/dirname.c (dirname): Ignore trailing slashes at end of
	non-null result [PR libc/2600].

	* misc/tst-dirname.c: Add more tests.
Diffstat (limited to 'misc/tst-dirname.c')
-rw-r--r--misc/tst-dirname.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/tst-dirname.c b/misc/tst-dirname.c
index 0808b839df..a428786db6 100644
--- a/misc/tst-dirname.c
+++ b/misc/tst-dirname.c
@@ -1,5 +1,5 @@
 /* Test program for dirname function a la XPG.
-   Copyright (C) 1996, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -62,5 +62,9 @@ main (void)
   result |= test ("//usr//", "//");
   result |= test ("//", "//");
 
+  /* Other Unix implementations behave like this.  */
+  result |= test ("x///y", "x");
+  result |= test ("x/////y", "x");
+
   return result != 0;
 }