Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pkgs/source_span/test/multiple_highlight_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@ gibble bibble bop
'"""));
});

test('highlights non contiguous spans', () {
expect(
file.span(17, 21).highlightMultiple(
'one', {file.span(60, 66): 'two', file.span(4, 7): '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