Test all features
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.
This commit is contained in:
leafOfTree committed 2026-10-20 01:21:17 +00:00
1 parent 2ed782e422
commit 68b866210b
23 files changed
+281 -15

No files matched your search

+25
View File
@@ -13,3 +13,28 @@ let g:vim_vue_plugin_config = {
\'foldexpr': 1,
\'full_syntax': ['scss', 'less'],
\}
" Block tag, syntax by lang="..." or the first in config, and block group
" with css prefix for emmet-vim
function! Check()
call ExpectBlock('div.set', 'template', 'pug', 'pugTemplateBlock')
call ExpectBlock('<template></template>', 'template', 'html', 'htmlTemplateBlock')
call ExpectBlock('export default', 'script', 'javascript', 'javascriptScriptBlock')
call ExpectBlock('import Vue', 'script', 'typescript', 'typescriptScriptBlock')
call ExpectBlock('# Assignment', 'script', 'coffee', 'coffeeScriptBlock')
call ExpectBlock('p {', 'style', 'css', 'cssStyleBlock')
call ExpectBlock('$a: 100px', 'style', 'scss', 'cssScssStyleBlock')
call ExpectBlock('$w: 128px', 'style', 'sass', 'sassStyleBlock')
call ExpectBlock('@list: 10 12', 'style', 'less', 'cssLessStyleBlock')
call ExpectBlock("@import 'vendor'", 'style', 'stylus', 'cssStylusStyleBlock')
call ExpectBlock('"requiresAuth"', 'route', 'json', 'jsonRouteBlock')
call ExpectBlock('# This is', 'docs', 'markdown', 'markdownDocsBlock')
call ExpectBlock('en:', 'i18n', 'yaml', 'yamlI18nBlock')
call ExpectBlock('"en"', 'i18n', 'json', 'jsonI18nBlock')
" Syntax from a sync point, as after jumping to the end
silent edit!
normal! G
call search('"en"', 'bW')
call ExpectEqual(GetVueSyntax(), 'json', 'syntax at the end after reload')
endfunction