@Test public void testInvalidLanguageInGrammar() {
		String grammar =
			"grammar T;\n" +
			"options { language=Foo; }\n" +
			"start : 'T' EOF;\n";
		String expected =
			"error(" + ErrorType.CANNOT_CREATE_TARGET_GENERATOR.code + "):  ANTLR cannot generate Foo code as of version " + Tool.VERSION + "\n";

		String[] pair = new String[] {
			grammar,
			expected
		};

		testErrors(pair, true);
	}
This is a regression test for antlr/antlr4#649 "unknown target causes
null ptr exception.".
https://github.com/antlr/antlr4/issues/649
tool-testsuite/test/org/antlr/v4/test/tool/TestToolSyntaxErrors.java