Incredible that some of these tests pass

This commit is contained in:
2019-03-16 21:23:40 -06:00
parent 557ab44d21
commit 568f8d3d2e
2 changed files with 24 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ You can {insert} the values of expressions.
{you} can start an output line with an insert expression. {and_end_one}
{shuffle: Things get weird|when you start to use sequence expressions.}
// If you don't believe me, just look at ParserTest.hx!!
{once: And they don't get any {easier}|{when you nest them|{insert}}}!
{once: And they don't get any {easier}|{>when you nest them|{insert}}}!
You can {
if (flag) "insert" else "interpolate"

View File

@@ -43,6 +43,29 @@ class ParserTest extends utest.Test {
)
]))
);
assertNextExpr(
EOutput(new Output([
AltExpression(
new Alt(
OnceOnly,
[
new Output([Text("And they don't get any "), HExpression("easier")]),
new Output([AltExpression(
new Alt(
Sequence,
[
new Output([Text("when you nest them")]),
new Output([HExpression("insert")])
]
)
)]
)]
)
), Text("!")
]))
);
assertNextExpr(EOutput(new Output([Text("You can "), HExpression('\n if (flag) "insert" else "interpolate"\n'), Text(" the value of multiline expressions without splitting a line of output.")])));
}