Set the 'failed' flag
Add tests for input containing syntax errors
Minor formatting tweaks