Skip to content

Commit 7c1d1f4

Browse files
committed
Include test for trailing space in a TODO marker
1 parent 6ca1cc5 commit 7c1d1f4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

RubberduckTests/TodoExplorer/TodoExplorerTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public void PicksUpComments_SpecialCharacters()
9090
const string inputCode =
9191
@"' To-do - this is a todo comment
9292
' N@TE this is a note comment
93-
' bug: this should work with a colon separator
93+
' bug this should work with a trailing space
94+
' bug: this should not be seen due to the colon
9495
";
9596

9697
var builder = new MockVbeBuilder();
@@ -102,7 +103,7 @@ public void PicksUpComments_SpecialCharacters()
102103
var parser = MockParser.Create(vbe.Object);
103104
using (var state = parser.State)
104105
{
105-
var cs = GetConfigService(new[] { "TO-DO", "N@TE", "BUG" });
106+
var cs = GetConfigService(new[] { "TO-DO", "N@TE", "BUG " });
106107
var vm = new ToDoExplorerViewModel(state, cs, GetOperatingSystemMock().Object);
107108

108109
parser.Parse(new CancellationTokenSource());
@@ -113,7 +114,7 @@ public void PicksUpComments_SpecialCharacters()
113114

114115
var comments = vm.Items.Select(s => s.Type);
115116

116-
Assert.IsTrue(comments.SequenceEqual(new[] { "TO-DO", "N@TE", "BUG" }));
117+
Assert.IsTrue(comments.SequenceEqual(new[] { "TO-DO", "N@TE", "BUG " }));
117118
}
118119
}
119120

0 commit comments

Comments
 (0)