Blame tests/network/matchhost.c

Packit ae9e2a
#include "clar_libgit2.h"
Packit ae9e2a
#include "netops.h"
Packit ae9e2a
Packit ae9e2a
void test_network_matchhost__match(void)
Packit ae9e2a
{
Packit ae9e2a
	cl_git_pass(gitno__match_host("*.example.org", "www.example.org"));
Packit ae9e2a
	cl_git_pass(gitno__match_host("*.foo.example.org", "www.foo.example.org"));
Packit ae9e2a
	cl_git_fail(gitno__match_host("*.foo.example.org", "foo.example.org"));
Packit ae9e2a
	cl_git_fail(gitno__match_host("*.foo.example.org", "www.example.org"));
Packit ae9e2a
	cl_git_fail(gitno__match_host("*.example.org", "example.org"));
Packit ae9e2a
	cl_git_fail(gitno__match_host("*.example.org", "www.foo.example.org"));
Packit ae9e2a
	cl_git_fail(gitno__match_host("*.example.org", "blah.www.www.example.org"));
Packit ae9e2a
}