public void Variables() { var expr = "v"; var parsed = HandlebarsExpression.Parse(expr); Assert.IsType <HandlebarsVariable>(parsed); Assert.Equal("v", (parsed as HandlebarsVariable).Name); expr = "var1"; parsed = HandlebarsExpression.Parse(expr); Assert.IsType <HandlebarsVariable>(parsed); Assert.Equal("var1", (parsed as HandlebarsVariable).Name); expr = "var_1"; parsed = HandlebarsExpression.Parse(expr); Assert.IsType <HandlebarsVariable>(parsed); Assert.Equal("var_1", (parsed as HandlebarsVariable).Name); expr = "*"; // illegal character Assert.Throws <Sprache.ParseException>(() => HandlebarsExpression.Parse(expr)); }