]> git.madduck.net Git - etc/vim.git/blobdiff - test/syntax.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Drop defined known scheme
[etc/vim.git] / test / syntax.vader
index d73062d44e9aa5bfb4ab6506ce8e81946b7e9325..d985b2c1bccdbf2716f9b388d580f0c313217fc3 100644 (file)
@@ -107,12 +107,6 @@ Given markdown;
 Execute (autolink with scheme case is insensitive):
   AssertEqual SyntaxOf('a'), 'mkdInlineURL'
 
-Given markdown;
-<notascheme://a>
-
-Execute (autolink without known scheme is not a link):
-  AssertNotEqual SyntaxOf('n'), 'mkdInlineURL'
-
 Given markdown;
 <a>
 
@@ -167,6 +161,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 +233,46 @@ Execute (indent code blocks after list):
   AssertNotEqual SyntaxOf('b'), 'mkdCode'
   AssertEqual SyntaxOf('c'), 'mkdCode'
 
+Given markdown;
+```c++
+#include <iostream>
+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_'
+
+
+Given markdown;
+```
+=
+a
+-
+```
+
+Execute (first = or - in fenced code block is not setex headers):
+  AssertEqual SyntaxOf('='), 'mkdCode'
+  AssertEqual SyntaxOf('-'), 'mkdCode'
+
 # Math
 
 Given markdown;