Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Add a test covering the highlighting of non-contiguous spans #116

Closed
wants to merge 1 commit into from
Closed
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
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