]> git.wincent.com - docvim.git/commit
Overhaul testing and compilation
authorGreg Hurrell <greg@hurrell.net>
Sun, 5 Jun 2016 14:06:32 +0000 (07:06 -0700)
committerGreg Hurrell <greg@hurrell.net>
Sun, 5 Jun 2016 14:06:32 +0000 (07:06 -0700)
commit10945177bc1c250f96056047514c416cf4a2eecf
tree4399b6bced3f79892eee4077382977802b974bca
parentaf8409300dcafb43a9a54ee7345e56aca8bd467d
Overhaul testing and compilation

We now "compile" in the test suite, meaning that we pipe our translation units
through the various extraction transforms after parsing. This means three main
things:

- Everything is nested inside a `Project` node type now, consisting of one or
  more translation units.
- Nodes within the project are ordered (or reordered) to maintain desired
  section ordering.
- As we add more phases to "compilation" (eg. automated insertion of table
  of contents etc), these will get reflected in the test suite automatically.

As part of this, extracted test-specific bits out into a new `Util` module (ie.
pretty-printing methods, convenience functions) and the "compile" pipeline into
a `Compile` module.
48 files changed:
docvim.cabal
lib/Docvim/CLI.hs
lib/Docvim/Compile.hs [new file with mode: 0644]
lib/Docvim/Parse.hs
lib/Docvim/Printer/Markdown.hs
lib/Docvim/Printer/Vim.hs
lib/Docvim/Util.hs [new file with mode: 0644]
tests/fixtures/markdown/integration-ferret-plugin.golden
tests/fixtures/markdown/ordering-across-docblocks.golden [new file with mode: 0644]
tests/fixtures/markdown/ordering-across-docblocks.vim [new file with mode: 0644]
tests/fixtures/markdown/ordering-within-docblocks.golden [new file with mode: 0644]
tests/fixtures/markdown/ordering-within-docblocks.vim [new file with mode: 0644]
tests/fixtures/parser/backticks.golden
tests/fixtures/parser/blank-docblock-lines.golden
tests/fixtures/parser/blockquotes.golden
tests/fixtures/parser/br-tags.golden
tests/fixtures/parser/comments.golden
tests/fixtures/parser/empty-function.golden
tests/fixtures/parser/empty.golden
tests/fixtures/parser/endfunction.golden
tests/fixtures/parser/fenced-code-blocks.golden
tests/fixtures/parser/function-autoloaded.golden
tests/fixtures/parser/function-bang.golden
tests/fixtures/parser/function-command-variants.golden
tests/fixtures/parser/function-script-local.golden
tests/fixtures/parser/function-varargs.golden
tests/fixtures/parser/function-with-nested-contents.golden
tests/fixtures/parser/functions-with-attributes.golden
tests/fixtures/parser/headings.golden
tests/fixtures/parser/integration-docvim.golden
tests/fixtures/parser/integration-ferret-ftplugin-qf.golden
tests/fixtures/parser/integration-ferret-plugin.golden
tests/fixtures/parser/integration-ferret-private.golden
tests/fixtures/parser/integration-pinnacle.golden
tests/fixtures/parser/just-whitespace.golden
tests/fixtures/parser/let.golden
tests/fixtures/parser/lexpr.golden
tests/fixtures/parser/link-targets.golden
tests/fixtures/parser/links.golden
tests/fixtures/parser/list-items.golden
tests/fixtures/parser/lw.golden
tests/fixtures/parser/minimal-annotation.golden
tests/fixtures/parser/phrasing-content.golden
tests/fixtures/parser/plugin-annotation.golden
tests/fixtures/parser/simple-annotations.golden
tests/fixtures/parser/trailing-comment.golden
tests/fixtures/vim/integration-ferret-plugin.golden
tests/tasty.hs