diff --git a/ParserTests/EBNFTests.cs b/ParserTests/EBNFTests.cs index 235cef86..4c2f6234 100644 --- a/ParserTests/EBNFTests.cs +++ b/ParserTests/EBNFTests.cs @@ -590,6 +590,18 @@ public void TestContextualParsing() Assert.True(res.IsOk); Assert.Equal(4,res.Result); } + + [Fact] + public void TestContextualParsing2() + { + var buildResult = buildSimpleExpressionParserWithContext(); + + Assert.False(buildResult.IsError); + var parser = buildResult.Result; + var res = parser.ParseWithContext("2 + a * b", new Dictionary {{"a", 2},{"b",3}}); + Assert.True(res.IsOk); + Assert.Equal(8,res.Result); + } #endregion