1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-17 22:44:49 +01:00
git/test-wildmatch.c
Nguyễn Thái Ngọc Duy feabcc173b Integrate wildmatch to git
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-15 14:58:17 -07:00

14 lines
359 B
C

#include "cache.h"
#include "wildmatch.h"
int main(int argc, char **argv)
{
if (!strcmp(argv[1], "wildmatch"))
return wildmatch(argv[3], argv[2]) ? 0 : 1;
else if (!strcmp(argv[1], "iwildmatch"))
return iwildmatch(argv[3], argv[2]) ? 0 : 1;
else if (!strcmp(argv[1], "fnmatch"))
return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
else
return 1;
}