projects
/
platform
/
upstream
/
findutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 4.5.14
[platform/upstream/findutils.git]
/
tests
/
test-fnmatch.c
diff --git
a/tests/test-fnmatch.c
b/tests/test-fnmatch.c
index
66f9b1c
..
de94559
100644
(file)
--- a/
tests/test-fnmatch.c
+++ b/
tests/test-fnmatch.c
@@
-1,5
+1,5
@@
/* Test of fnmatch string matching function.
/* Test of fnmatch string matching function.
- Copyright (C) 2009-201
1
Free Software Foundation, Inc.
+ Copyright (C) 2009-201
4
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-46,5
+46,11
@@
main ()
ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", 0) == 0);
ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", FNM_NOESCAPE) == FNM_NOMATCH);
ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", 0) == 0);
ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", FNM_NOESCAPE) == FNM_NOMATCH);
+ /* Verify that an unmatched [ is treated as a literal, as POSIX
+ requires. This test ensures that glibc Bugzilla bug #12378 stays
+ fixed.
+ */
+ ASSERT (res = fnmatch ("[/b", "[/b", 0) == 0);
+
return 0;
}
return 0;
}