X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e6961592519b5e89307aeae07fa648599aa6a490..70e12b926f24f5eed93d9e35db515dd1887b994d:/test/syntax.vader diff --git a/test/syntax.vader b/test/syntax.vader index d73062d..ebd197e 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -167,6 +167,22 @@ code Execute (code blocks can be fenced with tildes): AssertEqual SyntaxOf('c'), 'mkdCode' +Given markdown; +~~~~ +code +~~~~~ + +Execute (code blocks can be fenced with tildes longer than 3): + AssertEqual SyntaxOf('c'), 'mkdCode' + +Given markdown; +```` +code +````` + +Execute (code blocks can be fenced with backticks longer than 3): + AssertEqual SyntaxOf('c'), 'mkdCode' + Given markdown; ~~~ruby code @@ -223,6 +239,34 @@ Execute (indent code blocks after list): AssertNotEqual SyntaxOf('b'), 'mkdCode' AssertEqual SyntaxOf('c'), 'mkdCode' +Given markdown; +```c++ +#include +code +``` + +```ruby +def a +end +``` + +Execute (fenced code block syntax with a language specifier): + let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax') + call b:func(0) + AssertEqual SyntaxOf('include'), 'cInclude' + AssertEqual SyntaxOf('code'), 'mkdSnippetCPP' + AssertEqual SyntaxOf('def'), 'rubyDefine' + +Given markdown; +```a+b- +code +``` + +Execute (fenced code block syntax with an unknown language specifier): + let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax') + call b:func(0) + AssertEqual SyntaxOf('code'), 'mkdSnippetA_B_' + # Math Given markdown;