Fixed #59395 - Emmet Syntax Profiles tag_nl produces no extra space (#60108)

* fix

* fixed typo

* Formatting
This commit is contained in:
Matt Q
2018-10-22 22:39:49 -04:00
committed by Ramya Rao
parent 03f77028ab
commit 19ac31a246
2 changed files with 18 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
import 'mocha';
import * as assert from 'assert';
import { Selection } from 'vscode';
import { Selection, workspace, ConfigurationTarget } from 'vscode';
import { withRandomFileEditor, closeAllEditors } from './testUtils';
import { wrapWithAbbreviation, wrapIndividualLinesWithAbbreviation } from '../abbreviationActions';
@@ -56,6 +56,13 @@ const wrapMultiLineAbbrExpected = `
</ul>
`;
const wrapInlineElementExpectedFormatFalse = `
<ul class="nav main">
<h1><li class="item1">img</li></h1>
<h1><li class="item2">$hithere</li></h1>
</ul>
`;
suite('Tests for Wrap with Abbreviations', () => {
teardown(closeAllEditors);
@@ -63,6 +70,7 @@ suite('Tests for Wrap with Abbreviations', () => {
const multiCursorsWithSelection = [new Selection(2, 2, 2, 28), new Selection(3, 2, 3, 33)];
const multiCursorsWithFullLineSelection = [new Selection(2, 0, 2, 28), new Selection(3, 0, 4, 0)];
const oldValueForSyntaxProfiles = workspace.getConfiguration('emmet').inspect('syntaxProfile');
test('Wrap with block element using multi cursor', () => {
return testWrapWithAbbreviation(multiCursors, 'div', wrapBlockElementExpected);
@@ -340,6 +348,14 @@ suite('Tests for Wrap with Abbreviations', () => {
});
});
});
test('Wrap individual lines with abbreviation and format set to false', () => {
return workspace.getConfiguration('emmet').update('syntaxProfiles',{ 'html' : { 'format': false } } , ConfigurationTarget.Global).then(() => {
return testWrapWithAbbreviation(multiCursors,'h1',wrapInlineElementExpectedFormatFalse).then(() => {
return workspace.getConfiguration('emmet').update('syntaxProfiles',oldValueForSyntaxProfiles ? oldValueForSyntaxProfiles.globalValue : undefined, ConfigurationTarget.Global);
});
});
});
});