forked from VimPlug/emmet-vim
Add test for #140
This commit is contained in:
13
unittest.vim
13
unittest.vim
@@ -142,8 +142,8 @@ function! s:do_tests(...)
|
|||||||
try
|
try
|
||||||
if exists('g:user_emmet_settings')
|
if exists('g:user_emmet_settings')
|
||||||
let s:old_user_emmet_settings = g:user_emmet_settings
|
let s:old_user_emmet_settings = g:user_emmet_settings
|
||||||
let g:user_emmet_settings = { 'indentation': "\t" }
|
|
||||||
endif
|
endif
|
||||||
|
let g:user_emmet_settings = { 'indentation': "\t" }
|
||||||
let oldmore = &more
|
let oldmore = &more
|
||||||
call s:reload(fnamemodify(s:sfile, ':h'))
|
call s:reload(fnamemodify(s:sfile, ':h'))
|
||||||
let &more = 0
|
let &more = 0
|
||||||
@@ -153,7 +153,7 @@ function! s:do_tests(...)
|
|||||||
echohl ErrorMsg | echomsg v:exception | echohl None
|
echohl ErrorMsg | echomsg v:exception | echohl None
|
||||||
finally
|
finally
|
||||||
let &more=oldmore
|
let &more=oldmore
|
||||||
if exists('g:user_emmet_settings')
|
if exists('s:old_user_emmet_settings')
|
||||||
let g:user_emmet_settings = s:old_user_emmet_settings
|
let g:user_emmet_settings = s:old_user_emmet_settings
|
||||||
endif
|
endif
|
||||||
endtry
|
endtry
|
||||||
@@ -556,6 +556,15 @@ finish
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'name': 'contains dash in attributes',
|
||||||
|
'tests': [
|
||||||
|
{
|
||||||
|
'query': "div[foo-bar=\"baz\"",
|
||||||
|
'result': "<div foo-bar=\"baz\"></div>",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user