Skip to content

Commit b94b29c

Browse files
committed
Add test for not adding line tags to shadow lines
1 parent 12af900 commit b94b29c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

YarnSpinner.Tests/ProjectTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ This is a line with an embedded \#hashtag in it.
380380
}
381381
}
382382

383+
// The modified source does not have a #line tag on the same line as a #shadow tag
384+
var lineTagOnSameLineAsShadowTag = new Regex(@"(#line.*#shadow.*)|(#shadow.*#line.*)");
385+
output.Should().NotMatchRegex(lineTagOnSameLineAsShadowTag);
386+
383387
// we now should have seen every line ID, plus the entry for the shadow line
384388
compilationResult.StringTable.Count.Should().Be(expectedResults.Count + 1);
385389
compilationResult.StringTable.Count.Should().Be(visitedIDs.Count + 1);

0 commit comments

Comments
 (0)