Tests invalid and valid syntaxes.