ubuntu-buildroot/output/build/host-gawk-5.2.0/test/fnmatch.awk

14 lines
399 B
Awk
Raw Normal View History

2024-04-01 15:19:46 +00:00
@load "fnmatch"
BEGIN {
# can't print the values; they vary from system to system
for (i in FNM)
printf("\"%s\" is an element in FNM\n", i)
# can't even print this
# print "FNM_NOMATCH =", FNM_NOMATCH
printf("fnmatch(\"*.a\", \"foo.a\", 0) = %d\n", fnmatch("*.a", "foo.a", 0) )
if (fnmatch("*.a", "foo.c", 0) == FNM_NOMATCH)
printf("fnmatch(\"*.a\", \"foo.c\", 0) == FNM_NOMATCH\n")
}