X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/21152904788bb285019ae619db89b475bc378cc2..c58a4f3586473f7476510714698e60835fcb94ef:/test/table-format.vader?ds=sidebyside diff --git a/test/table-format.vader b/test/table-format.vader index c29ab034..f7028cb0 100644 --- a/test/table-format.vader +++ b/test/table-format.vader @@ -29,3 +29,57 @@ Expect (table is not modified): | a | b | |---|---| | 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 || +| :- | --: |:---:|:| +| left |right| center || + +Execute (format table with colons): + TableFormat + +Expect (preserve colons to align text): + | 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 |