diff --git a/examples/parsing/misc.hank b/examples/parsing/misc.hank index 837868d..843ec8e 100644 --- a/examples/parsing/misc.hank +++ b/examples/parsing/misc.hank @@ -31,4 +31,6 @@ var test2 = 5; --(labeled) deep gather * Simplest possible choice -++ {condition} Choice that ends with a divert -> target \ No newline at end of file +++ {condition} Choice that ends with a divert -> target +* ->fallback_choice +* -> \ No newline at end of file diff --git a/tests/ParserTest.hx b/tests/ParserTest.hx index b544be7..2e79ef2 100644 --- a/tests/ParserTest.hx +++ b/tests/ParserTest.hx @@ -106,5 +106,7 @@ class ParserTest extends utest.Test { assertNextExpr(EChoice(0, true, None, None, 1, new Output([Text("Simplest possible choice")]),None)); assertNextExpr(EChoice(1, false, None, Some("condition"), 2, new Output([Text("Choice that ends with a divert")]),Some("target"))); + assertNextExpr(EChoice(2, true, None, None, 1, new Output([]),Some("fallback_choice"))); + assertNextExpr(EChoice(3, true, None, None, 1, new Output([]),Some(""))); } } \ No newline at end of file