7 char pattern
[] = "a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*";
8 const char *string
= "aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmm"
9 "nnnnooooppppqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyy";
10 if (fnmatch (pattern
, string
, 0) != FNM_NOMATCH
)
12 puts ("First fnmatch didn't return FNM_NOMATCH");
15 pattern
[(sizeof pattern
) - 3] = '*';
16 if (fnmatch (pattern
, string
, 0) != 0)
18 puts ("Second fnmatch didn't return 0");
21 if (fnmatch ("a*b/*", "abbb/.x", FNM_PATHNAME
| FNM_PERIOD
) != FNM_NOMATCH
)
23 puts ("Third fnmatch didn't return FNM_NOMATCH");
26 if (fnmatch ("a*b/*", "abbb/xy", FNM_PATHNAME
| FNM_PERIOD
) != 0)
28 puts ("Fourth fnmatch didn't return 0");
31 if (fnmatch ("[", "[", 0) != 0)
33 puts ("Fifth fnmatch didn't return 0");
39 #define TEST_FUNCTION do_test ()
40 #include "../test-skeleton.c"