Antlr4.Test.StringTemplate.TestSyntaxErrors.TestValidButOutOfPlaceCharOnDifferentLine C# (CSharp) Method

TestValidButOutOfPlaceCharOnDifferentLine() private method

private TestValidButOutOfPlaceCharOnDifferentLine ( ) : void
return void
        public void TestValidButOutOfPlaceCharOnDifferentLine()
        {
            string templates =
                    "foo() ::= \"hi <\n" +
                    ".> mom\"\n";
            writeFile(tmpdir, "t.stg", templates);

            ErrorBuffer errors = new ErrorBuffer();
            TemplateGroupFile group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg"));
            group.Listener = errors;
            group.Load(); // force load
            string expected = "[t.stg 1:15: \\n in string, t.stg 1:14: doesn't look like an expression]";
            string result = errors.Errors.ToListString();
            Assert.AreEqual(expected, result);
        }