\n")
endfunction
function! expand.text_dollar() abort
call s:assert.equals(s:emmet.expand_word('{test case $ }*3', 'html'), 'test case 1 test case 2 test case 3 ')
endfunction
function! expand.text_dollar_newline() abort
call s:assert.equals(s:emmet.expand_word('{test case $${nr}}*3', 'html'), "test case 1\ntest case 2\ntest case 3\n")
endfunction
function! expand.text_escaped_dollar() abort
call s:assert.equals(s:emmet.expand_word('{test case \$ }*3', 'html'), 'test case $ test case $ test case $ ')
endfunction
function! expand.text_dollar_padding() abort
call s:assert.equals(s:emmet.expand_word('{test case $$$ }*3', 'html'), 'test case 001 test case 002 test case 003 ')
endfunction
function! expand.title_dollar_hash() abort
call s:assert.equals(s:emmet.expand_word('a[title=$#]{foo}', 'html'), "foo\n")
endfunction
function! expand.span_item_dollar_text() abort
call s:assert.equals(s:emmet.expand_word('span.item$*2>{item $}', 'html'), "item 1\nitem 2\n")
endfunction
function! expand.visual_wrap_indented() abort
let res = s:emmet.expand_in_buffer("\t$$$$\\ggVG\\,div\\$$$$", 'html', "\t
\n\t\t\n\t
")
call s:assert.equals(res, "\t
\n\t\t\n\t
")
endfunction
function! expand.expand_inside_tag() abort
let res = s:emmet.expand_in_buffer('a$$$$', 'html', '')
call s:assert.equals(res, '')
endfunction
function! expand.bem_filter() abort
call s:assert.equals(s:emmet.expand_word('form.search-form._wide>input.-query-string+input:s.-btn_large|bem', 'html'), "\n")
endfunction
function! expand.fieldset_legend_label() abort
call s:assert.equals(s:emmet.expand_word('form>fieldset>legend+(label>input[type="checkbox"])*3', 'html'), "\n")
endfunction
endfunction
" }}}
" split join tag {{{
function! s:suite.__split_join_tag()
let split_join = themis#suite('split join tag')
function! split_join.join_tag() abort
let res = s:emmet.expand_in_buffer("
\n\t$$$$\\j$$$$\n
", 'html', "
\n\t\n
")
call s:assert.equals(res, "
\n\t\n
")
endfunction
function! split_join.split_tag() abort
let res = s:emmet.expand_in_buffer("
\n\tj$$$$/>\n
", 'html', "
\n\t\n
")
call s:assert.equals(res, "
\n\t\n
")
endfunction
function! split_join.join_with_complex_attr() abort
let res = s:emmet.expand_in_buffer("
500)\">test$$$$\\j$$$$/>\n
", 'html', '')
call s:assert.equals(res, '')
endfunction
function! split_join.split_custom_tag() abort
let res = s:emmet.expand_in_buffer("
\n\tj$$$$/>\n
", 'html', "
\n\t\n
")
call s:assert.equals(res, "
\n\t\n
")
endfunction
endfunction
" }}}
" toggle comment {{{
function! s:suite.__toggle_comment()
let comment = themis#suite('toggle comment')
function! comment.add_comment() abort
let res = s:emmet.expand_in_buffer("
\n\t$$$$\\/$$$$\n
", 'html', "
\n\t\n
")
call s:assert.equals(res, "
\n\t\n
")
endfunction
function! comment.remove_comment() abort
let res = s:emmet.expand_in_buffer("
\n\t\n
", 'html', "
\n\t\n
")
call s:assert.equals(res, "
\n\t\n
")
endfunction
endfunction
" }}}
" image size {{{
function! s:suite.__image_size()
let imgsize = themis#suite('image size')
function! imgsize.remote_png() abort
let res = s:emmet.expand_in_buffer("img[src=http://mattn.kaoriya.net/images/logo.png]$$$$\\,\\i$$$$", 'html', '')
call s:assert.equals(res, '')
endfunction
function! imgsize.local_missing() abort
let res = s:emmet.expand_in_buffer("img[src=/logo.png]$$$$\\,\\i$$$$", 'html', '')
call s:assert.equals(res, '')
endfunction
function! imgsize.overwrite_existing() abort
let res = s:emmet.expand_in_buffer("img[src=http://mattn.kaoriya.net/images/logo.png width=foo height=bar]$$$$\\,\\i$$$$", 'html', '')
call s:assert.equals(res, '')
endfunction
endfunction
" }}}
" move next prev {{{
function! s:suite.__move_next_prev()
let move = themis#suite('move next prev')
function! move.move_to_third_attr() abort
let res = s:emmet.expand_in_buffer("foo+bar+baz[dankogai=\"\"]$$$$\\,\\gg0\\n\\n\\n\\Byw:%d _\\p$$$$", 'html', 'dankogai')
call s:assert.equals(res, 'dankogai')
endfunction
endfunction
" }}}
" contains dash in attributes {{{
function! s:suite.__dash_in_attributes()
let dash = themis#suite('contains dash in attributes')
function! dash.foo_bar_attr() abort
call s:assert.equals(s:emmet.expand_word('div[foo-bar="baz"]', 'html'), "\n")
endfunction
endfunction
" }}}
" default attributes {{{
function! s:suite.__default_attributes()
let defattr = themis#suite('default attributes')
function! defattr.a_href_shorthand() abort
call s:assert.equals(s:emmet.expand_word('p.title>a[/hoge/]', 'html'), "