test for nested groups in emmet

This commit is contained in:
Ramya Achutha Rao 2017-08-01 17:12:46 -07:00
parent 22a6fe5c9c
commit f41fc0134c

View file

@ -46,6 +46,7 @@ const htmlContents = `
${bemFilterExample} ${bemFilterExample}
(ul>li.item$)*2 (ul>li.item$)*2
(ul>li.item$)*2+span (ul>li.item$)*2+span
(div>dl>(dt+dd)*2)
</body> </body>
`; `;
@ -134,6 +135,10 @@ suite('Tests for Expand Abbreviations (HTML)', () => {
return testHtmlExpandAbbreviation(new Selection(18, 21, 18, 21), '(ul>li.item$)*2+span', '<ul>\n\t\t<li class="item1"></li>\n\t</ul>\n\t<ul>\n\t\t<li class="item2"></li>\n\t</ul>\n\t<span></span>'); return testHtmlExpandAbbreviation(new Selection(18, 21, 18, 21), '(ul>li.item$)*2+span', '<ul>\n\t\t<li class="item1"></li>\n\t</ul>\n\t<ul>\n\t\t<li class="item2"></li>\n\t</ul>\n\t<span></span>');
}); });
test('Expand abbreviation with nested groups (HTML)', () => {
return testHtmlExpandAbbreviation(new Selection(19, 19, 19, 19), '(div>dl>(dt+dd)*2)', '<div>\n\t\t<dl>\n\t\t\t<dt></dt>\n\t\t\t<dd></dd>\n\t\t\t<dt></dt>\n\t\t\t<dd></dd>\n\t\t</dl>\n\t</div>');
});
test('Expand tag that is opened, but not closed (HTML)', () => { test('Expand tag that is opened, but not closed (HTML)', () => {
return testHtmlExpandAbbreviation(new Selection(9, 6, 9, 6), '<div', '<div></div>'); return testHtmlExpandAbbreviation(new Selection(9, 6, 9, 6), '<div', '<div></div>');
}); });