add tests for match() and test()