Alternate fix for #34162 using minscore for fuzzymatching

This commit is contained in:
Ramya Achutha Rao
2017-09-23 23:41:44 -07:00
parent 2c263add93
commit de7ce81e76
5 changed files with 11 additions and 19 deletions

View File

@@ -11,6 +11,7 @@ import { expandEmmetAbbreviation, wrapWithAbbreviation, wrapIndividualLinesWithA
const cssContents = `
.boo {
margin: 20px 10px;
m10
background-image: url('tryme.png');
m10
}
@@ -189,9 +190,9 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
test('Expand abbreviation (CSS)', () => {
return withRandomFileEditor(cssContents, 'css', (editor, doc) => {
editor.selection = new Selection(4, 1, 4, 4);
editor.selections = [new Selection(3, 1, 3, 4), new Selection(5, 1, 5, 4)];
return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), cssContents.replace('m10', 'margin: 10px;'));
assert.equal(editor.document.getText(), cssContents.replace(/m10/g, 'margin: 10px;'));
return Promise.resolve();
});
});