diff options
Diffstat (limited to 'test/fnmatch.awk')
-rw-r--r-- | test/fnmatch.awk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/fnmatch.awk b/test/fnmatch.awk new file mode 100644 index 00000000..b3717549 --- /dev/null +++ b/test/fnmatch.awk @@ -0,0 +1,13 @@ +@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") +} |