Skip to content

Commit 5e2527e

Browse files
committed
Add another test
1 parent 7e318b2 commit 5e2527e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,28 @@ public void ParsesMagicCallOuts() => Block!.CallOuts
239239
[Fact]
240240
public void HasNoErrors() => Collector.Diagnostics.Should().HaveCount(0);
241241
}
242+
243+
public class CodeBlockWithChevronInsideCode(ITestOutputHelper output) : CodeBlockCallOutTests(output, "csharp",
244+
"""
245+
app.UseFilter<StopwatchFilter>(); <1>
246+
app.UseFilter<CatchExceptionFilter>(); <2>
247+
248+
var x = 1; <1>
249+
var y = x - 2;
250+
var z = y - 2; <1> <2>
251+
""",
252+
"""
253+
1. First callout
254+
2. Second callout
255+
"""
256+
)
257+
{
258+
[Fact]
259+
public void ParsesMagicCallOuts() => Block!.CallOuts
260+
.Should().NotBeNullOrEmpty()
261+
.And.HaveCount(5)
262+
.And.OnlyContain(c => c.Text.StartsWith("<"));
263+
264+
[Fact]
265+
public void HasNoErrors() => Collector.Diagnostics.Should().HaveCount(0);
266+
}

0 commit comments

Comments
 (0)