public void TestCantDefineEmbeddedRegionAgain()
{
string dir = tmpdir;
string g = "a() ::= <<[<@r>foo<@end>]>>\n" +
"@a.r() ::= <<bar>>\n"; // error; dup
writeFile(dir, "g.stg", g);
TemplateGroupFile group = new TemplateGroupFile(Path.Combine(dir, "g.stg"));
ErrorBuffer errors = new ErrorBuffer();
group.Listener = errors;
group.Load();
string expected = "g.stg 2:3: the explicit definition of region /a.r hides an embedded definition in the same group" + newline;
string result = errors.ToString();
Assert.AreEqual(expected, result);
}