diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-10-10 21:00:50 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-10-10 21:00:50 +0000 |
commit | fc2a4f5f837f259c239fbd15911f80ca8c6907e3 (patch) | |
tree | 2be478cfcb93051f657027d6fafd96778aa49317 /posix/tst-gnuglob.c | |
parent | 75cb5a0d471729d28a59b693441e2d527c9e962e (diff) | |
download | glibc-fc2a4f5f837f259c239fbd15911f80ca8c6907e3.tar glibc-fc2a4f5f837f259c239fbd15911f80ca8c6907e3.tar.gz glibc-fc2a4f5f837f259c239fbd15911f80ca8c6907e3.tar.bz2 glibc-fc2a4f5f837f259c239fbd15911f80ca8c6907e3.zip |
Updated to fedora-glibc-20071010T2047cvs/fedora-glibc-2_6_90-18
Diffstat (limited to 'posix/tst-gnuglob.c')
-rw-r--r-- | posix/tst-gnuglob.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/posix/tst-gnuglob.c b/posix/tst-gnuglob.c index 72f3fa4a3e..95bfbae641 100644 --- a/posix/tst-gnuglob.c +++ b/posix/tst-gnuglob.c @@ -1,6 +1,6 @@ /* Test the GNU extensions in glob which allow the user to provide callbacks for the filesystem access functions. - Copyright (C) 2001-2002 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2001. @@ -103,6 +103,16 @@ find_file (const char *s) int level = 1; long int idx = 0; + while (s[0] == '/') + { + if (s[1] == '\0') + { + s = "."; + break; + } + ++s; + } + if (strcmp (s, ".") == 0) return 0; @@ -439,6 +449,12 @@ main (void) "dir2lev1/dir1lev2/.dir", "dir2lev1/dir1lev2/.foo"); + test ("\\/*", GLOB_ALTDIRFUNC, + "/dir1lev1", + "/dir2lev1", + "/file1lev1", + "/file2lev1"); + globfree (&gl); return result; |