summaryrefslogtreecommitdiff
path: root/test-wildmatch.c
blob: 74c08644eebbea411dce0603d7c87f144d0e1446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "cache.h"
#include "wildmatch.h"

int main(int argc, char **argv)
{
	if (!strcmp(argv[1], "wildmatch"))
		return !!wildmatch(argv[3], argv[2], 0);
	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);
	else
		return 1;
}