wildmatch: make wildmatch's return value compatible with fnmatch
[git/git.git] / test-wildmatch.c
CommitLineData
feabcc17
NTND
1#include "cache.h"
2#include "wildmatch.h"
3
4int main(int argc, char **argv)
5{
6 if (!strcmp(argv[1], "wildmatch"))
3ae5396c 7 return !!wildmatch(argv[3], argv[2]);
feabcc17 8 else if (!strcmp(argv[1], "iwildmatch"))
3ae5396c 9 return !!iwildmatch(argv[3], argv[2]);
feabcc17
NTND
10 else if (!strcmp(argv[1], "fnmatch"))
11 return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
12 else
13 return 1;
14}