public void TestImportRelativeTemplateFile()
{
/*
dir
group1.stg that imports c.st
subdir
c.st
*/
string dir = tmpdir;
string groupFile =
"import \"subdir/c.st\"\n" +
"a() ::= \"g1 a\"\n" +
"b() ::= \"<c()>\"\n";
writeFile(dir, "group1.stg", groupFile);
string stFile =
"c() ::= \"c\"\n";
writeFile(dir, Path.Combine("subdir", "c.st"), stFile);
TemplateGroup group1 = new TemplateGroupFile(Path.Combine(dir, "group1.stg"));
Template st = group1.GetInstanceOf("c"); // should see c()
string expected = "c";
string result = st?.Render();
Assert.AreEqual(expected, result);
}