11 { "lib", "*LIB*", FNM_PERIOD, FNM_NOMATCH },
12 { "lib", "*LIB*", FNM_CASEFOLD|FNM_PERIOD, 0 },
13 { "a/b", "a[/]b", 0, 0 },
14 { "a/b", "a[/]b", FNM_PATHNAME, FNM_NOMATCH },
15 { "a/b", "[a-z]/[a-z]", 0, 0 },
24 for (i = 0; i < sizeof (tests) / sizeof (*tests); i++)
28 match = fnmatch (tests[i].pattern, tests[i].name, tests[i].flags);
29 if (match != tests[i].expected)
31 printf ("%s %s %s\n", tests[i].pattern,
32 match == 0 ? "matches" : "does not match",