Skip to content

Commit 8dc42f6

Browse files
anth12oformaniuk
authored andcommitted
Added unit test for issue 535
1 parent 7d7e3c0 commit 8dc42f6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

source/Handlebars.Test/IssueTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,5 +723,15 @@ public void LastLetterCutOff()
723723

724724
Assert.Equal("abcd", templateOutput);
725725
}
726+
727+
// Issue: https://github.com/Handlebars-Net/Handlebars.Net/issues/535
728+
// Issue refers to invalid template causing OutOfMemoryException
729+
[Fact]
730+
public void UnrecognisedExpressionThrowsOutOfMemoryException()
731+
{
732+
var source = "{{Name | invalid}}";
733+
734+
Assert.Throws<HandlebarsCompilerException>(()=> Handlebars.Compile(source));
735+
}
726736
}
727737
}

0 commit comments

Comments
 (0)