Do not lookahead when extracting css abbreviations Fixes #46452

This commit is contained in:
Ramya Achutha Rao
2018-03-23 17:38:02 -07:00
parent 2823cd4b73
commit e7ce1f53ea
2 changed files with 18 additions and 1 deletions

View File

@@ -110,6 +110,23 @@ nav#
});
});
test('Skip when typing the last property value in single line rules (CSS)', () => {
const testContent = `.foo {padding: 10px; margin: a}`;
return withRandomFileEditor(testContent, 'css', (editor, doc) => {
editor.selection = new Selection(0, 30, 0, 30);
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(0, 30), cancelSrc.token);
if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`);
}
return Promise.resolve();
});
});
});
test('Allow hex color when typing property values when there is a property in the next line (CSS)', () => {
const testContent = `
.foo {