aboutsummaryrefslogtreecommitdiff
path: root/test/test-pandoc.hs
AgeCommit message (Collapse)AuthorFilesLines
2021-08-10Add RTF reader.John MacFarlane1-0/+2
- `rtf` is now supported as an input format as well as output. - New module Text.Pandoc.Readers.RTF (exporting `readRTF`). [API change] Closes #3982.
2021-03-19Tests: Use getExecutablePath from base...John MacFarlane1-2/+1
avoiding the need to depend on the executable-path package.
2021-02-07Avoid unnecessary use of NoImplicitPrelude pragma (#7089)Albert Krewinkel1-2/+0
2021-02-02Test suite: a more robust way of testing the executable.John MacFarlane1-6/+19
Mmny of our tests require running the pandoc executable. This is problematic for a few different reasons. First, cabal-install will sometimes run the test suite after building the library but before building the executable, which means the executable isn't in place for the tests. One can work around that by first building, then building and running the tests, but that's fragile. Second, we have to find the executable. So far, we've done that using a function findPandoc that attempts to locate it relative to the test executable (which can be located using findExecutablePath). But the logic here is delicate and work with every combination of options. To solve both problems, we add an `--emulate` option to the `test-pandoc` executable. When `--emulate` occurs as the first argument passed to `test-pandoc`, the program simply emulates the regular pandoc executable, using the rest of the arguments (after `--emulate`). Thus, test-pandoc --emulate -f markdown -t latex is just like pandoc -f markdown -t latex Since all the work is done by library functions, implementing this emulation just takes a couple lines of code and should be entirely reliable. With this change, we can test the pandoc executable by running the test program itself (locatable using findExecutablePath) with the `--emulate` option. This removes the need for the fragile `findPandoc` step, and it means we can run our integration tests even when we're just building the library, not the executable. Part of this change involved simplifying some complex handling to set environment variables for dynamic library paths. I have tested a build with `--enable-dynamic-executable`, and it works, but further testing may be needed.
2020-09-12[API change] Rename Writers.Tables and its contents (#6679)Christian Despres1-2/+2
Writers.Tables is now Writers.AnnotatedTable. All of the types and functions in it have had the "Ann" removed from them. Now it is expected that the module be imported qualified.
2020-09-05Add Writers.Tables helper functions and types, add tests for those (#6655)Christian Despres1-0/+2
Add Writers.Tables helper functions and types, add tests for those The Writers.Tables module contains an AnnTable type that is a pandoc Table with added inferred information that should be enough for writers (in particular the HTML writer) to operate on without having to lay out the table themselves. The toAnnTable and fromAnnTable functions in that module convert between AnnTable and Table. In addition to producing an AnnTable with coherent and well-formed annotations, the toAnnTable function also normalizes its input Table like the table builder does. Various tests ensure that toAnnTable normalizes tables exactly like the table builder, and that its annotations are coherent.
2020-07-08Escape starting periods in ms writer code blocksMichael Hoffmann1-0/+2
If a line of ms code block output starts with a period (.), it should be prepended by '\&' so that it is not interpreted as a roff command. Fixes #6505
2020-04-15Adapt to the newest Table type, fix some previous adaptation issuesdespresc1-1/+1
- Writers.Native is now adapted to the new Table type. - Inline captions should now be conditionally wrapped in a Plain, not a Para block. - The toLegacyTable function now lives in Writers.Shared.
2020-03-31Jira writer: convert spans with class `underline` to inserted textAlbert Krewinkel1-0/+2
Spans with class `underline` as converted into Jira text marked as `+inserted+`, i.e. surrounded by plus-signs.
2019-12-17Add jira reader (#5913)Albert Krewinkel1-0/+2
Closes #5556
2019-05-20Improve output of Lua tests (#5499)Albert Krewinkel1-1/+5
This makes use of tasty-lua, a package to write tests in Lua and integrate the results into Tasty output. Test output becomes more informative: individual tests and test groups become visible in test output. Failures are reported with helpful error messages.
2019-01-31Tests: avoid calling findPandoc multiple times.John MacFarlane1-4/+5
2019-01-06Add DokuWiki reader (#5108)Alexander1-0/+2
Closes #1792
2019-01-04Fix findPandoc so it works with cabalv2.John MacFarlane1-1/+5
2018-05-09Merge branch 'master' into groff_readerYan Pashkovsky1-0/+4
2018-05-09basic manfile parsingYan Pas1-1/+1
2018-04-26Add FB2 reader (#4539)Alexander1-0/+2
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-02-25initialYan Pas1-0/+2
2017-12-28PowerPoint writer: Introduce beginning of testsJesse Rosenthal1-0/+2
This is the beginning of a test suite for the powerpoint writer. Initial tests are for the number of slides. Note that at the moment it does not test against corruption in Microsoft PowerPoint; it just tests that certain outcomes work as expected. More tests will be added. This test framework uses the PandocPure monad introduced with Pandoc 2.0.
2017-12-20Add Basic JATS reader based on DocBook readerHamish Mackenzie1-0/+2
2017-12-13fig, table-wrap & caption Divs for JATS writerHamish Mackenzie1-0/+2
Support writing <fig> and <table-wrap> elements with <title> and <caption> inside them by using Divs with class set to on of fig, table-wrap or cation. The title is included as a Heading so the constraint on where Heading can occur is also relaxed. Also leaves out empty alt attributes on links.
2017-10-28Add new style FB2 testsAlexander Krotov1-0/+2
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-3/+3
2017-10-26Creole reader (#3994)Sascha Wilde1-0/+2
This is feature complete but not very thoroughly tested yet.
2017-06-19Add Muse reader (#3620)Alexander Krotov1-0/+2
2017-03-20Lua filters (#3514)Albert Krewinkel1-0/+2
* Add `--lua-filter` option. This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed. Note that lua filters are all applied after regular filters, regardless of their position on the command line. * Add Text.Pandoc.Lua, exporting `runLuaFilter`. Add `pandoc.lua` to data files. * Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module. * Add Tests.Lua to tests. * Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters. * Document in MANUAL.txt.
2017-03-14Use tasty for tests rather than test-framework.John MacFarlane1-6/+4
2017-03-10Add Muse writer (#3489)Alexander Krotov1-0/+2
* Add Muse writer * Advertise new Muse writer * Muse writer: add regressions tests
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-13/+13
2017-02-12Add Org writer unit testsAlexander Krotov1-0/+2
2017-02-04Added new test framework Tests.Command.John MacFarlane1-2/+2
Any files added under test/command will be treated as shell tests (see smart.md for an example). This makes it very easy to add regression tests etc.
2017-02-04Added skeleton for Tests.Command.John MacFarlane1-0/+2
2017-02-04Moved tests/ -> test/.John MacFarlane1-0/+65