public void TestElseIfElse()
{
string template = "go: <if(name)>hi, foo<elseif(user)>a user<else>bye<endif>";
CompiledTemplate code = new TemplateCompiler(new TemplateGroup()).Compile(template);
string asmExpected =
"write_str 0, " +
"load_attr 1, " +
"brf 15, " +
"write_str 2, " +
"br 30, " +
"load_attr 3, " +
"brf 27, " +
"write_str 4, " +
"br 30, " +
"write_str 5";
string asmResult = code.GetInstructions();
Assert.AreEqual(asmExpected, asmResult);
string stringsExpected = "[go: , name, hi, foo, user, a user, bye]";
string stringsResult = code.strings.ToListString();
Assert.AreEqual(stringsExpected, stringsResult);
}