mirror of
https://github.com/mattn/emmet-vim.git
synced 2026-03-25 05:48:06 +08:00
CI: test only with Vim head, remove skip workarounds
This commit is contained in:
@@ -264,19 +264,11 @@ Describe html
|
||||
Assert Equals(res, 'foo <span></span> bar')
|
||||
End
|
||||
|
||||
It wraps visual word (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("foo $$$$\\<c-o>ve\\<c-y>,p\\<cr>$$$$bar baz", 'html', 'foo <p>bar</p> baz')
|
||||
It wraps visual word let res = ExpandInBuffer("foo $$$$\\<c-o>ve\\<c-y>,p\\<cr>$$$$bar baz", 'html', 'foo <p>bar</p> baz')
|
||||
Assert Equals(res, 'foo <p>bar</p> baz')
|
||||
End
|
||||
|
||||
It wraps visual multi word (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("foo $$$$\\<c-o>vee\\<c-y>,p\\<cr>$$$$bar baz", 'html', 'foo <p>bar baz</p>')
|
||||
It wraps visual multi word let res = ExpandInBuffer("foo $$$$\\<c-o>vee\\<c-y>,p\\<cr>$$$$bar baz", 'html', 'foo <p>bar baz</p>')
|
||||
Assert Equals(res, 'foo <p>bar baz</p>')
|
||||
End
|
||||
|
||||
@@ -293,27 +285,15 @@ Describe html
|
||||
Assert Equals(ExpandWord('(div>(label+input))+div', 'html'), "<div>\n\t<label for=\"\"></label>\n\t<input type=\"\">\n</div>\n<div></div>\n")
|
||||
End
|
||||
|
||||
It wraps visual lines with multiplier (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("test1\ntest2\ntest3$$$$\\<esc>ggVG\\<c-y>,ul>li>span*>a\\<cr>$$$$", 'html', "<ul>\n\t<li>\n\t\t<span><a href=\"\">test1</a></span>\n\t\t<span><a href=\"\">test2</a></span>\n\t\t<span><a href=\"\">test3</a></span>\n\t</li>\n</ul>")
|
||||
It wraps visual lines with multiplier let res = ExpandInBuffer("test1\ntest2\ntest3$$$$\\<esc>ggVG\\<c-y>,ul>li>span*>a\\<cr>$$$$", 'html', "<ul>\n\t<li>\n\t\t<span><a href=\"\">test1</a></span>\n\t\t<span><a href=\"\">test2</a></span>\n\t\t<span><a href=\"\">test3</a></span>\n\t</li>\n</ul>")
|
||||
Assert Equals(res, "<ul>\n\t<li>\n\t\t<span><a href=\"\">test1</a></span>\n\t\t<span><a href=\"\">test2</a></span>\n\t\t<span><a href=\"\">test3</a></span>\n\t</li>\n</ul>")
|
||||
End
|
||||
|
||||
It wraps visual lines with input (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("test1\ntest2\ntest3$$$$\\<esc>ggVG\\<c-y>,input[type=input value=$#]*\\<cr>$$$$", 'html', "<input type=\"input\" value=\"test1\">\n<input type=\"input\" value=\"test2\">\n<input type=\"input\" value=\"test3\">")
|
||||
It wraps visual lines with input let res = ExpandInBuffer("test1\ntest2\ntest3$$$$\\<esc>ggVG\\<c-y>,input[type=input value=$#]*\\<cr>$$$$", 'html', "<input type=\"input\" value=\"test1\">\n<input type=\"input\" value=\"test2\">\n<input type=\"input\" value=\"test3\">")
|
||||
Assert Equals(res, "<input type=\"input\" value=\"test1\">\n<input type=\"input\" value=\"test2\">\n<input type=\"input\" value=\"test3\">")
|
||||
End
|
||||
|
||||
It wraps visual lines with div id (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("test1\ntest2\ntest3$$$$\\<esc>ggVG\\<c-y>,div[id=$#]*\\<cr>$$$$", 'html', "<div id=\"test1\"></div>\n<div id=\"test2\"></div>\n<div id=\"test3\"></div>")
|
||||
It wraps visual lines with div id let res = ExpandInBuffer("test1\ntest2\ntest3$$$$\\<esc>ggVG\\<c-y>,div[id=$#]*\\<cr>$$$$", 'html', "<div id=\"test1\"></div>\n<div id=\"test2\"></div>\n<div id=\"test3\"></div>")
|
||||
Assert Equals(res, "<div id=\"test1\"></div>\n<div id=\"test2\"></div>\n<div id=\"test3\"></div>")
|
||||
End
|
||||
|
||||
@@ -349,11 +329,7 @@ Describe html
|
||||
Assert Equals(ExpandWord('span.item$*2>{item $}', 'html'), "<span class=\"item1\">item 1</span>\n<span class=\"item2\">item 2</span>\n")
|
||||
End
|
||||
|
||||
It wraps visual indented block (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("\t<div class=\"footer_nav\">\n\t\t<a href=\"#\">nav link</a>\n\t</div>$$$$\\<esc>ggVG\\<c-y>,div\\<cr>$$$$", 'html', "\t<div>\n\t\t<div class=\"footer_nav\">\n\t\t\t<a href=\"#\">nav link</a>\n\t\t</div>\n\t</div>")
|
||||
It wraps visual indented block let res = ExpandInBuffer("\t<div class=\"footer_nav\">\n\t\t<a href=\"#\">nav link</a>\n\t</div>$$$$\\<esc>ggVG\\<c-y>,div\\<cr>$$$$", 'html', "\t<div>\n\t\t<div class=\"footer_nav\">\n\t\t\t<a href=\"#\">nav link</a>\n\t\t</div>\n\t</div>")
|
||||
Assert Equals(res, "\t<div>\n\t\t<div class=\"footer_nav\">\n\t\t\t<a href=\"#\">nav link</a>\n\t\t</div>\n\t</div>")
|
||||
End
|
||||
|
||||
@@ -462,19 +438,11 @@ Describe html
|
||||
End
|
||||
|
||||
Describe update tag
|
||||
It adds class (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("<h$$$$\\<c-y>u.global\\<cr>$$$$3></h3>", 'html', '<h3 class="global"></h3>')
|
||||
It adds class let res = ExpandInBuffer("<h$$$$\\<c-y>u.global\\<cr>$$$$3></h3>", 'html', '<h3 class="global"></h3>')
|
||||
Assert Equals(res, '<h3 class="global"></h3>')
|
||||
End
|
||||
|
||||
It adds class preserving attribute (skip: ex mode)
|
||||
if mode() ==# 'c'
|
||||
Skip not supported in ex mode
|
||||
endif
|
||||
let res = ExpandInBuffer("<button$$$$\\<c-y>u.btn\\<cr>$$$$ disabled></button>", 'html', '<button class="btn" disabled></button>')
|
||||
It adds class preserving attribute let res = ExpandInBuffer("<button$$$$\\<c-y>u.btn\\<cr>$$$$ disabled></button>", 'html', '<button class="btn" disabled></button>')
|
||||
Assert Equals(res, '<button class="btn" disabled></button>')
|
||||
End
|
||||
End
|
||||
|
||||
Reference in New Issue
Block a user