X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fnmatch.c;h=9dd06933d74eb04047a8b63845613eb13ad1d629;hb=c9f0960c2cd1acf9c29b27860589698ea54fa4ec;hp=a85db70b5727031268eeabb67155ae782d0e10d0;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/tests/test-fnmatch.c b/tests/test-fnmatch.c index a85db70b5..9dd06933d 100644 --- a/tests/test-fnmatch.c +++ b/tests/test-fnmatch.c @@ -1,5 +1,5 @@ /* Test of fnmatch string matching function. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009-2012 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 @@ -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); + /* 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; }