mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-11-01 10:06:24 +08:00
test / test (push) Canceled after 0s
Add cases for attribute highlight on and off, block syntax by lang and emmet-vim group names, OnChangeVueSyntax(), matchit, .wpy, initial_indent as syntax and tag.syntax, and syntax after reloading. Also check indenting a file after removing all indent with g:test_flatten, which fails before the end tag fix as closing tags at column 0 were taken as block end tags.
24 lines
759 B
VimL
24 lines
759 B
VimL
" One-line blocks like <style>p { color: red; }</style>
|
|
|
|
function! Check()
|
|
call ExpectSyntax('script', 'javascriptScriptBlock')
|
|
call ExpectSyntax('p {', 'cssStyleBlock')
|
|
call ExpectSyntax('color', 'cssTextProp')
|
|
call ExpectSyntax('p {', 'cssStyleBlock')
|
|
call ExpectSyntax('color', 'cssTextProp')
|
|
call ExpectSyntax('Hello', 'htmlTemplateBlock')
|
|
call CheckSync()
|
|
endfunction
|
|
|
|
" Syntax from a sync point, as after jumping to a line not displayed yet
|
|
function! CheckSync()
|
|
silent edit!
|
|
call cursor(line('$'), 1)
|
|
call search('Hello', 'cW')
|
|
if index(SyntaxList(), 'htmlTemplateBlock') == -1
|
|
call Fail('after syncing, Hello should be htmlTemplateBlock, but got '
|
|
\.string(SyntaxList()))
|
|
endif
|
|
endfunction
|
|
let g:test_flatten = 1
|