move some test code in main to test_match.c