]> 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:

Remove extra blank line from README markdown
[etc/vim.git] / test / syntax.vader
index d985b2c1bccdbf2716f9b388d580f0c313217fc3..e63ce7ef95def80c266dc919b99f724e151be36a 100644 (file)
@@ -55,6 +55,15 @@ Execute (italic with escaped underscores):
   AssertEqual SyntaxOf('c'), 'htmlItalic'
   AssertNotEqual SyntaxOf('d'), 'htmlItalic'
 
   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
 
 Given markdown;
 a __b\_\_c__ d
 
@@ -89,6 +98,20 @@ Execute (multiple links on a line):
   AssertNotEqual SyntaxOf('c'), 'mkdLink'
   AssertNotEqual SyntaxOf('c'), 'mkdURL'
 
   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;
 # Autolinks
 
 Given markdown;
@@ -245,7 +268,7 @@ end
 ```
 
 Execute (fenced code block syntax with a language specifier):
 ```
 
 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'
   call b:func(0)
   AssertEqual SyntaxOf('include'), 'cInclude'
   AssertEqual SyntaxOf('code'), 'mkdSnippetCPP'
@@ -257,7 +280,7 @@ code
 ```
 
 Execute (fenced code block syntax with an unknown language specifier):
 ```
 
 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_'
 
   call b:func(0)
   AssertEqual SyntaxOf('code'), 'mkdSnippetA_B_'