Skip to content

Commit 311ec75

Browse files
committed
InAttributeVariables2
1 parent d892fe9 commit 311ec75

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

RazorEngineCore.Tests/TestCompileAndRun.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ public void TestCompileAndRun_InAttributeVariables()
7373
Assert.AreEqual("<div class=\"circle\" style=\"background-color: hsla(88, 70%, 80%,1);\">", actual);
7474
}
7575

76+
[TestMethod]
77+
public void TestCompileAndRun_InAttributeVariables2()
78+
{
79+
RazorEngine razorEngine = new RazorEngine();
80+
IRazorEngineCompiledTemplate template = razorEngine.Compile("<img src='@(\"test\")'>");
81+
82+
string actual = template.Run(new
83+
{
84+
Colour = 88
85+
});
86+
87+
Assert.AreEqual("<img src='test'>", actual);
88+
}
89+
7690
[TestMethod]
7791
public async Task TestCompileAndRun_InAttributeVariablesAsync()
7892
{

0 commit comments

Comments
 (0)