about summary refs log tree commit diff
path: root/posix/testfnm.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-15 09:36:19 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-15 09:36:19 +0000
commit955994e1313ab81c1db2a456b5fdf7cacb016366 (patch)
treee0366bf2c5c94172d932cfa3657d74418f005173 /posix/testfnm.c
parent0493a6d7e82806fc183a3c0b383fb95d3188b690 (diff)
downloadglibc-955994e1313ab81c1db2a456b5fdf7cacb016366.tar.gz
glibc-955994e1313ab81c1db2a456b5fdf7cacb016366.tar.xz
glibc-955994e1313ab81c1db2a456b5fdf7cacb016366.zip
Update.
2001-03-15  Ulrich Drepper  <drepper@redhat.com>

	* posix/fnmatch.h (FNM_EXTMATCH): Define.
	* posix/fnmatch.c (NO_LEADING_PERIOD): Define.
	(posixly_correct): Move global variable here.
	(INT, EXT, END): Name new functions defined in fnmatch_loop.c.
	(fnmatch): Pretty printing.
	* posix/fnmatch_loop.c: Add code to handle FNM_EXTMATCH.
	* posix/tst-fnmatch.c: Recognize EXTMATCH flag.
	* posix/tst-fnmatch.input: Add tests for extended matching.

	* posix/testfnm.c: Add test for patterns with multiple ** before /.
	* posix/fnmatch_loop.c: Fix problem with the test above.
Diffstat (limited to 'posix/testfnm.c')
-rw-r--r--posix/testfnm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/posix/testfnm.c b/posix/testfnm.c
index b735a26579..f3165324e9 100644
--- a/posix/testfnm.c
+++ b/posix/testfnm.c
@@ -54,6 +54,9 @@ struct {
   { "a/b", "*a*", FNM_PATHNAME|FNM_LEADING_DIR, 0 },
   { "ab/c", "*a?", FNM_PATHNAME|FNM_LEADING_DIR, 0 },
   { "ab/c", "a?", FNM_PATHNAME|FNM_LEADING_DIR, 0 },
+  { "a/b", "?*/?", FNM_PATHNAME, 0 },
+  { "/b", "*/?", FNM_PATHNAME, 0 },
+  { "/b", "**/?", FNM_PATHNAME, 0 },
 };
 
 int