Skip to content

Commit

Permalink
Add a test covering the highlighting of non-contiguous spans
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Sep 12, 2024
1 parent f81cd4a commit 22f9658
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/multiple_highlight_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ gibble bibble bop
'"""));
});


test('highlights non contiguous spans', () {
expect(
file.span(17, 21).highlightMultiple(
'one', {file.span(31, 34): 'two', file.span(60, 66): 'three'}),
equals("""
,
1 | foo bar baz
| === three
2 | whiz bang boom
| ^^^^ one
... |
5 | argle bargle boo
| ====== two
'"""));
});

test('highlights spans on the same line', () {
expect(
file.span(17, 21).highlightMultiple(
Expand Down

0 comments on commit 22f9658

Please sign in to comment.