]> git.madduck.net Git - etc/vim.git/blob - 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:

Merge pull request #125 from cirosantilli/remove-useless-line
[etc/vim.git] / test / syntax.vader
1 Given mkd (bold);
2 **bold** not bold
3
4 Execute (SyntaxOf(pattern)):
5   AssertEqual SyntaxOf('b'), 'htmlBold'
6
7 Given mkd (italic);
8 *italic*
9
10 Execute (SyntaxOf(pattern)):
11   AssertEqual SyntaxOf('i'), 'htmlItalic'
12
13 # Links
14
15 Given mkd;
16 [a](b)
17
18 Execute (link with title):
19   AssertEqual SyntaxOf('a'), 'mkdLink'
20   AssertEqual SyntaxOf('b'), 'mkdURL'
21
22 Given mkd;
23 (a)
24
25 Execute (parenthesis not in link):
26   AssertNotEqual SyntaxOf('a'), 'mkdLink'
27
28 Given mkd;
29 [a](b) c [d](e)
30
31 Execute (multiple links on a line):
32   AssertEqual SyntaxOf('c'), ''
33
34 # Math
35
36 Given mkd;
37 a $x$ b
38 c $$y$$ d
39 \$e\$
40 \$\$f\$\$
41
42 Execute (math):
43   AssertNotEqual SyntaxOf('x'), 'mkdMath'
44   AssertNotEqual SyntaxOf('y'), 'mkdMath'
45   let g:vim_markdown_math=1
46   syn off | syn on
47   AssertNotEqual SyntaxOf('a'), 'mkdMath'
48   AssertNotEqual SyntaxOf('b'), 'mkdMath'
49   AssertNotEqual SyntaxOf('c'), 'mkdMath'
50   AssertNotEqual SyntaxOf('d'), 'mkdMath'
51   AssertNotEqual SyntaxOf('e'), 'mkdMath'
52   AssertNotEqual SyntaxOf('f'), 'mkdMath'
53   AssertEqual SyntaxOf('x'), 'mkdMath'
54   AssertEqual SyntaxOf('y'), 'mkdMath'
55   let g:vim_markdown_math=0
56   syn off | syn on
57   AssertNotEqual SyntaxOf('x'), 'mkdMath'
58   AssertNotEqual SyntaxOf('y'), 'mkdMath'
59
60 Given mkd;
61 a
62
63 $
64 b
65 $
66
67 c
68
69 Execute (multiline math):
70   let g:vim_markdown_math=1
71   syn off | syn on
72   AssertNotEqual SyntaxOf('a'), 'mkdMath'
73   AssertEqual SyntaxOf('b'), 'mkdMath'
74   AssertNotEqual SyntaxOf('c'), 'mkdMath'