getopt, argp: Respect rules for use of AC_LIBOBJ.
[pspp] / tests / test-fnmatch.c
index 66f9b1c9bb2c4049f160e3b3bd822fa17f890062..71664a801702778ef48f624c1fec30f80e9828f3 100644 (file)
@@ -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;
 }