unit tests for grammars