mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-06 10:44:24 +08:00
fixed test tool.
This commit is contained in:
15
unittest.vim
15
unittest.vim
@@ -15,7 +15,7 @@ for testgroup in testgroups
|
||||
let testtitle = len(testtitle) < 57 ? (testtitle.repeat(' ', 57-len(testtitle))) : strpart(testtitle, 0, 57)
|
||||
echohl ModeMsg | echon "testing #".printf("%03d", n+1)
|
||||
echohl None | echon ": ".testtitle." ... "
|
||||
unlet! res | let res = ZenExpand(tests[n].query, '', 0)
|
||||
unlet! res | let res = ZenExpand(tests[n].query, tests[n].type, 0)
|
||||
if res == tests[n].result
|
||||
echohl Title | echon "ok\n" | echohl None
|
||||
else
|
||||
@@ -245,16 +245,19 @@ finish
|
||||
{
|
||||
'name': "div#box$*3>h3+p*2",
|
||||
'query': "div#box$*3>h3+p*2",
|
||||
'type': "html",
|
||||
'result': "<div id=\"box1\">\n\t<h3></h3>\n\t<p></p>\n\t<p></p>\n</div>\n<div id=\"box2\">\n\t<h3></h3>\n\t<p></p>\n\t<p></p>\n</div>\n<div id=\"box3\">\n\t<h3></h3>\n\t<p></p>\n\t<p></p>\n</div>\n"
|
||||
},
|
||||
{
|
||||
'name': "div#box$*3>h3+p.bar*2|e",
|
||||
'query': "div#box$*3>h3+p.bar*2|e",
|
||||
'type': "html",
|
||||
'result': "<div id=\"box1\">\n\t&lt;h3&gt;&lt;/h3&gt;\n\t&lt;p class=\"bar\"&gt;&lt;/p&gt;\n\t&lt;p class=\"bar\"&gt;&lt;/p&gt;\n</div>\n<div id=\"box2\">\n\t&lt;h3&gt;&lt;/h3&gt;\n\t&lt;p class=\"bar\"&gt;&lt;/p&gt;\n\t&lt;p class=\"bar\"&gt;&lt;/p&gt;\n</div>\n<div id=\"box3\">\n\t&lt;h3&gt;&lt;/h3&gt;\n\t&lt;p class=\"bar\"&gt;&lt;/p&gt;\n\t&lt;p class=\"bar\"&gt;&lt;/p&gt;\n</div>\n",
|
||||
},
|
||||
{
|
||||
'name': "div>div#page>p.title+p|c",
|
||||
'query': "div>div#page>p.title+p|c",
|
||||
'type': "html",
|
||||
'result': "<div>\n\t<!-- #page -->\n\t<div id=\"page\">\n\t\t<!-- .title -->\n\t\t<p class=\"title\"></p>\n\t\t<!-- /.title -->\n\t\t<p></p>\n\t</div>\n\t<!-- /#page -->\n</div>\n",
|
||||
},
|
||||
],
|
||||
@@ -266,7 +269,7 @@ finish
|
||||
'name': "@i",
|
||||
'query': "@i",
|
||||
'type': "css",
|
||||
'result': "<@i></@i>\n",
|
||||
'result': "@import url();",
|
||||
},
|
||||
{
|
||||
'name': "link:css",
|
||||
@@ -278,7 +281,13 @@ finish
|
||||
'name': "fs:n",
|
||||
'query': "fs:n",
|
||||
'type': "css",
|
||||
'result': "<fs></fs>\n",
|
||||
'result': "font-style:normal;",
|
||||
},
|
||||
{
|
||||
'name': "fl:l|fc",
|
||||
'query': "fl:l|fc",
|
||||
'type': "css",
|
||||
'result': "float: left;",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user