]> git.madduck.net Git - etc/vim.git/blobdiff - .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 'c58a4f3586473f7476510714698e60835fcb94ef'
[etc/vim.git] / .vim / bundle / vim-markdown / test / table-format.vader
index 2fc06a394b70f4102341d1faa88aff9ab010680b..f7028cb0a81f840c50c0a080341af35980c207c4 100644 (file)
@@ -30,6 +30,19 @@ Expect (table is not modified):
   |---|---|
   | c | d |
 
   |---|---|
   | c | d |
 
+Given markdown (indented table);
+  | a | b |
+  |---|---|
+  | c | d |
+
+Execute (format well formatted, indented table):
+  TableFormat
+
+Expect (table is not modified):
+    | a | b |
+    |---|---|
+    | c | d |
+
 Given markdown;
 | left |right|  center  ||
 | :- | --: |:---:|:|
 Given markdown;
 | left |right|  center  ||
 | :- | --: |:---:|:|
@@ -42,3 +55,31 @@ Expect (preserve colons to align text):
   | left | right | center |   |
   |:-----|------:|:------:|:--|
   | left | right | center |   |
   | left | right | center |   |
   |:-----|------:|:------:|:--|
   | left | right | center |   |
+
+Given markdown (indented table with colons);
+  | left |right|  center  ||
+  | :- | --: |:---:|:|
+  | left |right|  center  ||
+
+Execute (format indented table with colons):
+  TableFormat
+
+Expect (preserve colons to align text):
+    | left | right | center |   |
+    |:-----|------:|:------:|:--|
+    | left | right | center |   |
+
+Given markdown (borderless table);
+   left |right|  center 
+   :- | --: |:---:
+   left |right|  center  
+
+Execute (format borderless table):
+  let g:vim_markdown_borderless_table = 1
+  TableFormat
+  unlet g:vim_markdown_borderless_table
+
+Expect (table with borders):
+     | left | right | center |
+     |:-----|------:|:------:|
+     | left | right | center |