added test for pattern match in definition

Alas, it doesn't quite work yet
minor changes to test_definition_after_code
Passes test_patten_match_in_definition

It seems to work almost perfectly now!