X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/74c9c60796ef10284ba26aaf38ffb39beae5f62c..d80bf38f92fdd2516b1a2d5576c2a8089453d73b:/test/syntax.vader?ds=inline diff --git a/test/syntax.vader b/test/syntax.vader index b06ddf0..bb9ef2f 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -1,4 +1,4 @@ -Given mkd; +Given markdown; a **b** c Execute (bold): @@ -6,7 +6,7 @@ Execute (bold): AssertEqual SyntaxOf('b'), 'htmlBold' AssertNotEqual SyntaxOf('c'), 'htmlBold' -Given mkd; +Given markdown; a *b* c Execute (italic): @@ -16,14 +16,14 @@ Execute (italic): # Links -Given mkd; +Given markdown; [a](b) Execute (link with title): AssertEqual SyntaxOf('a'), 'mkdLink' AssertEqual SyntaxOf('b'), 'mkdURL' -Given mkd; +Given markdown; (a) (b) @@ -32,7 +32,7 @@ Execute (parenthesis not in link): AssertNotEqual SyntaxOf('a'), 'mkdURL' AssertNotEqual SyntaxOf('b'), 'mkdURL' -Given mkd; +Given markdown; [a](b) c [d](e) Execute (multiple links on a line): @@ -40,7 +40,7 @@ Execute (multiple links on a line): # Autolinks -Given mkd; +Given markdown; a c Execute (autolink): @@ -50,25 +50,25 @@ Execute (autolink): AssertEqual SyntaxOf('>'), 'mkdDelimiter' AssertNotEqual SyntaxOf('c'), 'mkdInlineURL' -Given mkd; +Given markdown; Execute (autolink with scheme case is insensitive): AssertEqual SyntaxOf('a'), 'mkdInlineURL' -Given mkd; +Given markdown; Execute (autolink without known scheme is not a link): AssertNotEqual SyntaxOf('n'), 'mkdInlineURL' -Given mkd; +Given markdown; Execute (autolink without scheme is not a link): AssertNotEqual SyntaxOf('a'), 'mkdInlineURL' -Given mkd; +Given markdown; < http://a > Execute (autolinks can be backslash escaped): AssertNotEqual SyntaxOf('<'), 'mkdDelimiter' +# Code Blocks + +Given markdown; +~~~ +code +~~~ + +Execute (code blocks can be fenced with tildes): + AssertEqual SyntaxOf('c'), 'mkdCode' + +Given markdown; +~~~ruby +code +~~~ + +Execute (code blocks can have a language specifier): + AssertEqual SyntaxOf('c'), 'mkdCode' + # Math -Given mkd; +Given markdown; a $x$ b c $$y$$ d \$e\$ @@ -113,7 +131,7 @@ Execute (math): AssertNotEqual SyntaxOf('x'), 'mkdMath' AssertNotEqual SyntaxOf('y'), 'mkdMath' -Given mkd; +Given markdown; a $ @@ -131,7 +149,7 @@ Execute (multiline math): # YAML frontmatter -Given mkd; +Given markdown; --- a: b --- @@ -145,7 +163,7 @@ Execute (YAML frontmatter is controlled by the option): syn off | syn on AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey' -Given mkd; +Given markdown; --- a: b @@ -156,7 +174,7 @@ Execute (YAML frontmatter only works if it's the first thing in the file): syn off | syn on AssertNotEqual SyntaxOf('a'), 'yamlBlockMappingKey' -Given mkd; +Given markdown; --- a: b ---