Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

test for broken expression spans #14

Merged
merged 1 commit into from
Sep 30, 2015
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
12 changes: 12 additions & 0 deletions test/declaration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,16 @@ void testHangs() {
expect(errorMessage.span.text.trim(), '');
}

void testExpressionSpans() {
final input = r'''.foo { width: 50px; }''';
var stylesheet = parseCss(input);
var decl = stylesheet.topLevels.single.declarationGroup.declarations.single;
// This passes
expect(decl.span.text, 'width: 50px');
// This currently fails
expect(decl.expression.span.text, '50px');
}

main() {
test('Simple Terms', testSimpleTerms);
test('Declarations', testDeclarations);
Expand All @@ -1021,4 +1031,6 @@ main() {
test('IE stuff', testIE);
test('IE declaration syntax', testIEDeclaration);
test('Hanging bugs', testHangs);
test('Expression spans', testExpressionSpans,
skip: 'expression spans are broken');
}