X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4f0120ec663e5b4a386563930ffbbea1f22d9029..b8f5e31cc406a811b24d9d45db5ebf220ab4735b:/test/syntax.vader diff --git a/test/syntax.vader b/test/syntax.vader index 6ad8907..1cda007 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -137,6 +137,24 @@ Given markdown; Execute (autolinks can be backslash escaped): AssertNotEqual SyntaxOf('<'), 'mkdDelimiter' +Given markdown; +a (http://b) c + +Execute (autolink in parenthesis): + AssertNotEqual SyntaxOf('a'), 'mkdInlineURL' + AssertEqual SyntaxOf('('), 'mkdDelimiter' + AssertEqual SyntaxOf('b'), 'mkdInlineURL' + AssertEqual SyntaxOf(')'), 'mkdDelimiter' + AssertNotEqual SyntaxOf('c'), 'mkdInlineURL' + +Given markdown; +[![a](http://b)](http://c) + +Execute (autolink in link text): + AssertEqual SyntaxOf('a'), 'mkdLink' + AssertEqual SyntaxOf('b'), 'mkdURL' + AssertEqual SyntaxOf('c'), 'mkdURL' + # Code Blocks Given markdown; @@ -155,6 +173,17 @@ code Execute (code blocks can have a language specifier): AssertEqual SyntaxOf('c'), 'mkdCode' +Given markdown; +```c++ +code +``` + +text + +Execute (code blocks can be fenced with backticks and a language specifier): + AssertEqual SyntaxOf('code'), 'mkdCode' + AssertNotEqual SyntaxOf('text'), 'mkdCode' + # Math Given markdown; @@ -199,15 +228,17 @@ Execute (multiline math): Given markdown; $ \sqrt{a}{b} $ -$$ \sqrt{a}{b} $$ +$$ \frac{a}{b} $$ Execute (math tex highlighting): let g:vim_markdown_math=0 syn off | syn on - AssertNotEqual SyntaxOf('a'), 'texMatcher' + AssertNotEqual SyntaxOf('sqrt'), 'texStatement' + AssertNotEqual SyntaxOf('frac'), 'texStatement' let g:vim_markdown_math=1 syn off | syn on - AssertEqual SyntaxOf('a'), 'texMatcher' + AssertEqual SyntaxOf('sqrt'), 'texStatement' + AssertEqual SyntaxOf('frac'), 'texStatement' # YAML frontmatter