lockfile: allow reopening a closed but still locked file
[gitweb.git] / test-wildmatch.c
index e384c8edb104c46c6cfe29677eccc8199fafe080..578b164fe603f11dfe67e25be36a6ab38aa6d645 100644 (file)
@@ -1,5 +1,4 @@
 #include "cache.h"
-#include "wildmatch.h"
 
 int main(int argc, char **argv)
 {
@@ -12,11 +11,11 @@ int main(int argc, char **argv)
                        argv[i] += 3;
        }
        if (!strcmp(argv[1], "wildmatch"))
-               return !!wildmatch(argv[3], argv[2], 0);
+               return !!wildmatch(argv[3], argv[2], WM_PATHNAME, NULL);
        else if (!strcmp(argv[1], "iwildmatch"))
-               return !!wildmatch(argv[3], argv[2], FNM_CASEFOLD);
-       else if (!strcmp(argv[1], "fnmatch"))
-               return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
+               return !!wildmatch(argv[3], argv[2], WM_PATHNAME | WM_CASEFOLD, NULL);
+       else if (!strcmp(argv[1], "pathmatch"))
+               return !!wildmatch(argv[3], argv[2], 0, NULL);
        else
                return 1;
 }