X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/7ec58485d1cd1d976e901819080ff078d90f4b77..fd74fcdff5cf237083beb93a7f7f1c5657c8dfa5:/test/syntax.vader diff --git a/test/syntax.vader b/test/syntax.vader index ebd197e..e63ce7e 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -55,6 +55,15 @@ Execute (italic with escaped underscores): AssertEqual SyntaxOf('c'), 'htmlItalic' AssertNotEqual SyntaxOf('d'), 'htmlItalic' +Given markdown; +a *b\*c* d + +Execute (italic with escaped asterisks): + AssertNotEqual SyntaxOf('a'), 'htmlItalic' + AssertEqual SyntaxOf('b'), 'htmlItalic' + AssertEqual SyntaxOf('c'), 'htmlItalic' + AssertNotEqual SyntaxOf('d'), 'htmlItalic' + Given markdown; a __b\_\_c__ d @@ -89,6 +98,20 @@ Execute (multiple links on a line): AssertNotEqual SyntaxOf('c'), 'mkdLink' AssertNotEqual SyntaxOf('c'), 'mkdURL' +Given markdown; +[a](b) + +Execute (conceal link): + setlocal conceallevel=2 + AssertEqual synconcealed(1, 1)[0], 1 + AssertEqual synconcealed(1, 2)[0], 0 + AssertEqual synconcealed(1, 3)[0], 1 + AssertEqual synconcealed(1, 4)[0], 1 + AssertEqual synconcealed(1, 4)[0], 1 + AssertEqual synconcealed(1, 5)[0], 1 + AssertEqual synconcealed(1, 6)[0], 1 + setlocal conceallevel=0 + # Autolinks Given markdown; @@ -107,12 +130,6 @@ Given markdown; Execute (autolink with scheme case is insensitive): AssertEqual SyntaxOf('a'), 'mkdInlineURL' -Given markdown; - - -Execute (autolink without known scheme is not a link): - AssertNotEqual SyntaxOf('n'), 'mkdInlineURL' - Given markdown; @@ -251,7 +268,7 @@ end ``` Execute (fenced code block syntax with a language specifier): - let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax') + let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'MarkdownRefreshSyntax') call b:func(0) AssertEqual SyntaxOf('include'), 'cInclude' AssertEqual SyntaxOf('code'), 'mkdSnippetCPP' @@ -263,10 +280,22 @@ code ``` Execute (fenced code block syntax with an unknown language specifier): - let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'Markdown_refresh_syntax') + let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'MarkdownRefreshSyntax') call b:func(0) AssertEqual SyntaxOf('code'), 'mkdSnippetA_B_' + +Given markdown; +``` += +a +- +``` + +Execute (first = or - in fenced code block is not setex headers): + AssertEqual SyntaxOf('='), 'mkdCode' + AssertEqual SyntaxOf('-'), 'mkdCode' + # Math Given markdown;