test/fnmatch.awk
raw| 1 | @load "fnmatch" |
| 2 | |
| 3 | BEGIN { |
| 4 | # can't print the values; they vary from system to system |
| 5 | for (i in FNM) |
| 6 | printf("\"%s\" is an element in FNM\n", i) |
| 7 | # can't even print this |
| 8 | # print "FNM_NOMATCH =", FNM_NOMATCH |
| 9 | |
| 10 | printf("fnmatch(\"*.a\", \"foo.a\", 0) = %d\n", fnmatch("*.a", "foo.a", 0) ) |
| 11 | if (fnmatch("*.a", "foo.c", 0) == FNM_NOMATCH) |
| 12 | printf("fnmatch(\"*.a\", \"foo.c\", 0) == FNM_NOMATCH\n") |
| 13 | } |