]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/vim-markdown/test/table-format.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 commit 'd49e95aa7ba744f0a7f544aca43afdb6aab41f24' as '.vim/bundle/asyncomplete...
[etc/vim.git] / .vim / bundle / vim-markdown / test / table-format.vader
1 Before:
2   let &gdefault = 1
3
4 After:
5   let &gdefault = 0
6
7 Given markdown;
8 | normal |no space|  2 spaces  ||
9 | - |-|  --- ||
10 | normal |no space|  2 spaces  ||
11
12 Execute (format unformatted table):
13   TableFormat
14
15 Expect (table is formatted):
16   | normal | no space | 2 spaces |  |
17   |--------|----------|----------|--|
18   | normal | no space | 2 spaces |  |
19
20 Given markdown;
21 | a | b |
22 |---|---|
23 | c | d |
24
25 Execute (format well formatted table):
26   TableFormat
27
28 Expect (table is not modified):
29   | a | b |
30   |---|---|
31   | c | d |
32
33 Given markdown (indented table);
34   | a | b |
35   |---|---|
36   | c | d |
37
38 Execute (format well formatted, indented table):
39   TableFormat
40
41 Expect (table is not modified):
42     | a | b |
43     |---|---|
44     | c | d |
45
46 Given markdown;
47 | left |right|  center  ||
48 | :- | --: |:---:|:|
49 | left |right|  center  ||
50
51 Execute (format table with colons):
52   TableFormat
53
54 Expect (preserve colons to align text):
55   | left | right | center |   |
56   |:-----|------:|:------:|:--|
57   | left | right | center |   |
58
59 Given markdown (indented table with colons);
60   | left |right|  center  ||
61   | :- | --: |:---:|:|
62   | left |right|  center  ||
63
64 Execute (format indented table with colons):
65   TableFormat
66
67 Expect (preserve colons to align text):
68     | left | right | center |   |
69     |:-----|------:|:------:|:--|
70     | left | right | center |   |
71
72 Given markdown (borderless table);
73    left |right|  center 
74    :- | --: |:---:
75    left |right|  center  
76
77 Execute (format borderless table):
78   let g:vim_markdown_borderless_table = 1
79   TableFormat
80   unlet g:vim_markdown_borderless_table
81
82 Expect (table with borders):
83      | left | right | center |
84      |:-----|------:|:------:|
85      | left | right | center |