pandoc/test
John MacFarlane 2415b2680a Test suite: a more robust way of testing the executable.
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.
2021-02-02 20:36:51 -08:00
..
command BibTeX writer: use doclayout and doctemplate. 2021-02-01 18:05:20 -08:00
docx Docx writer: handle table header using styles. 2021-01-12 09:49:10 -08:00
epub HTML reader: retain attribute prefixes and avoid duplicates. 2020-12-10 15:44:10 -08:00
fb2 FB2 writer: do not wrap note references into <sup> and brackets 2019-05-15 13:31:07 +03:00
ipynb Revert "Ipnyb: allow lossless round-tripping of markdown cell content." 2020-07-02 09:03:56 -07:00
lua Lua filters: add SimpleTable for backwards compatibility (#6575) 2020-09-20 15:48:31 -07:00
media Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
odt Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
pptx Powerpoint writer: allow arbitrary OOXML in raw inline elements 2020-12-27 23:18:54 +01:00
tables LaTeX writer: revert table line height increase in 2.11.3. 2021-01-02 07:56:07 -08:00
Tests Test suite: a more robust way of testing the executable. 2021-02-02 20:36:51 -08:00
bodybg.gif
creole-reader.native Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
creole-reader.txt Creole reader (#4002) 2017-10-29 13:28:50 -04:00
docbook-chapter.docbook docbook reader: fix nesting of chapters and sections (#5864) 2019-10-30 08:51:33 -07:00
docbook-chapter.native docbook reader: fix nesting of chapters and sections (#5864) 2019-10-30 08:51:33 -07:00
docbook-reader.docbook Docbook reader: implement <procedure> (#6442) 2020-06-14 10:45:52 -07:00
docbook-reader.native Docbook reader: implement <procedure> (#6442) 2020-06-14 10:45:52 -07:00
docbook-xref.docbook Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
docbook-xref.native
dokuwiki_external_images.dokuwiki Dokuwiki writer: remove automatic ':' prefix before internal image links (#5183) 2019-01-01 14:07:26 -08:00
dokuwiki_external_images.native
dokuwiki_inline_formatting.dokuwiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_inline_formatting.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
dokuwiki_multiblock_table.dokuwiki Dokuwiki writer: fix LineBreaks in Tables (#4444) 2018-03-11 18:20:36 -07:00
dokuwiki_multiblock_table.native Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
haddock-reader.haddock Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
haddock-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
html-reader.html HTML reader tests: improve test coverage of new features 2020-11-27 21:21:25 +01:00
html-reader.native HTML reader tests: improve test coverage of new features 2020-11-27 21:21:25 +01:00
insert
jats-reader.native Use the new builders, modify readers to preserve empty headers 2020-04-15 23:03:22 -04:00
jats-reader.xml Update JATS dtd (#6020) 2019-12-30 22:18:55 -08:00
jira-reader.jira Add jira reader (#5913) 2019-12-17 21:07:46 -08:00
jira-reader.native Jira reader: improve icon conversion 2020-04-09 16:21:45 +02:00
lalune.jpg
latex-reader.latex LaTeX reader test: Allow compilation of file (#5364) 2019-03-13 18:21:00 -06:00
latex-reader.native LaTeX reader: preserve center environment (#6852) 2020-11-26 12:04:31 -08:00
lhs-test-markdown.native Removed superfluous sourceCode class on code blocks. 2019-01-08 11:36:33 -08:00
lhs-test.fragment.html+lhs
lhs-test.html Update test with new skylighting CSS. 2020-12-17 11:10:00 -08:00
lhs-test.html+lhs Update test with new skylighting CSS. 2020-12-17 11:10:00 -08:00
lhs-test.latex latex template: put back amssymb 2020-11-25 16:08:10 -08:00
lhs-test.latex+lhs latex template: put back amssymb 2020-11-25 16:08:10 -08:00
lhs-test.markdown Removed superfluous sourceCode class on code blocks. 2019-01-08 11:36:33 -08:00
lhs-test.markdown+lhs
lhs-test.native Removed superfluous sourceCode class on code blocks. 2019-01-08 11:36:33 -08:00
lhs-test.rst RST writer: use more consistent indentation. 2018-04-19 13:47:16 -07:00
lhs-test.rst+lhs RST writer: use more consistent indentation. 2018-04-19 13:47:16 -07:00
man-reader.man Man reader: allow block-level content in table cells. 2018-10-27 23:37:18 -07:00
man-reader.native Use the new builders, modify readers to preserve empty headers 2020-04-15 23:03:22 -04:00
markdown-citations.native Markdown reader: Set citationNoteNum accurately in citations. 2020-09-21 10:10:37 -07:00
markdown-citations.txt Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
markdown-reader-more.native T.P.Parsing: modify gridTableWith' for headerless tables. 2021-01-07 11:07:03 -08:00
markdown-reader-more.txt Markdown reader: use CommonMark rules for list item nesting. 2017-08-19 15:45:01 -07:00
mediawiki-reader.native Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
mediawiki-reader.wiki
movie.jpg
opml-reader.native Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
opml-reader.opml Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
org-select-tags.native Org reader: add support for #+SELECT_TAGS. 2019-01-30 18:27:38 +01:00
org-select-tags.org Replace org #+KEYWORDS with #+keywords 2020-11-18 14:48:56 +01:00
pipe-tables.native Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
pipe-tables.txt Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
rst-reader.native T.P.Parsing: modify gridTableWith' for headerless tables. 2021-01-07 11:07:03 -08:00
rst-reader.rst Add highlight directive to the rST reader (#6140) 2020-02-13 10:27:34 -08:00
s5-basic.html Use CSS in favor of <br> for display math (#6372) 2020-05-18 22:45:44 -07:00
s5-fancy.html Update s5-fancy.html test with new mathjax URL. 2020-10-10 11:15:35 -07:00
s5-fragment.html
s5-inserts.html Use CSS in favor of <br> for display math (#6372) 2020-05-18 22:45:44 -07:00
s5.native
tables-rstsubset.native T.P.Parsing: modify gridTableWith' for headerless tables. 2021-01-07 11:07:03 -08:00
tables.asciidoc Asciidoc writer: shorter delimiters for tables, blockquotes. 2019-01-07 22:10:34 -08:00
tables.asciidoctor Adds Asciidoctor sprcific writer and tests 2019-02-09 08:21:53 -08:00
tables.context
tables.custom Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
tables.docbook4
tables.docbook5
tables.dokuwiki Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
tables.fb2 Use the new builders, modify readers to preserve empty headers 2020-04-15 23:03:22 -04:00
tables.haddock Haddock Writer: Support Haddock tables 2020-04-20 13:57:36 +08:00
tables.html4
tables.html5 Markdown reader/writer: spacing adjustments in tables. 2018-04-21 13:06:57 -07:00
tables.icml
tables.jats_archiving JATS writer: support advanced table features 2020-11-19 22:09:52 +01:00
tables.jats_articleauthoring JATS writer: support advanced table features 2020-11-19 22:09:52 +01:00
tables.jats_publishing JATS writer: support advanced table features 2020-11-19 22:09:52 +01:00
tables.jira Jira writer: fix output of table headers 2020-01-07 22:11:51 +01:00
tables.latex LaTeX writer: revert table line height increase in 2.11.3. 2021-01-02 07:56:07 -08:00
tables.man Move common groff functions to Text.Pandoc.Writers.Groff 2018-10-17 17:26:37 -07:00
tables.markdown Small test suite update. Markdown tables. 2018-04-21 14:16:24 -07:00
tables.mediawiki Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
tables.ms Update ms table tests. 2020-12-30 13:40:11 -08:00
tables.muse Muse writer: add support for grid tables 2018-10-25 18:35:02 +03:00
tables.native Use the new builders, modify readers to preserve empty headers 2020-04-15 23:03:22 -04:00
tables.opendocument Place caption before table in OpenDocument format. (#5869) 2019-11-03 07:17:05 -08:00
tables.org Replace org #+KEYWORDS with #+keywords 2020-11-18 14:48:56 +01:00
tables.plain
tables.rst RST writer: use simple tables when possible. 2018-10-06 22:33:24 -07:00
tables.rtf Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
tables.tei Use the new builders, modify readers to preserve empty headers 2020-04-15 23:03:22 -04:00
tables.texinfo Markdown reader/writer: spacing adjustments in tables. 2018-04-21 13:06:57 -07:00
tables.textile Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
tables.txt Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
tables.xwiki Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
tables.zimwiki Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
test-pandoc.hs Test suite: a more robust way of testing the executable. 2021-02-02 20:36:51 -08:00
testsuite.native Shared.compactify: Avoid mixed lists. 2019-02-25 17:33:54 -08:00
testsuite.txt Added spaced_reference_links extension. 2017-05-25 12:57:31 +02:00
textile-reader.native Fix typos in comments, doc strings, error messages, and tests 2020-10-14 22:26:51 +02:00
textile-reader.textile Fix typos in comments, doc strings, error messages, and tests 2020-10-14 22:26:51 +02:00
tikiwiki-reader.native Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
tikiwiki-reader.tikiwiki
twiki-reader.native Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
twiki-reader.twiki Moved tests/ -> test/. 2017-02-04 12:56:30 +01:00
txt2tags.native Support new Underline element in readers and writers (#6277) 2020-04-28 07:53:06 -07:00
txt2tags.t2t More spellcheck 2018-07-02 19:07:28 +03:00
vimwiki-reader.native Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
vimwiki-reader.wiki Vimwiki reader: Add nested syntax highlighting (#6257) 2020-04-06 16:41:28 -07:00
writer.asciidoc Asciidoctor images (#6671) 2020-09-19 18:22:52 -07:00
writer.asciidoctor Asciidoctor images (#6671) 2020-09-19 18:22:52 -07:00
writer.context Remove \setupthinrules from default context template. 2021-01-06 14:39:44 -08:00
writer.custom Fix custom writer test. 2020-10-08 12:32:42 -07:00
writer.docbook4 Add test fixes for docbook writer changes. 2020-04-01 23:09:14 -07:00
writer.docbook5 Add test fixes for docbook writer changes. 2020-04-01 23:09:14 -07:00
writer.dokuwiki DokuWiki writer: translate language names for code elements... 2020-11-04 22:38:53 -08:00
writer.fb2 FB2 writer: do not wrap note references into <sup> and brackets 2019-05-15 13:31:07 +03:00
writer.haddock Shared.compactify: Avoid mixed lists. 2019-02-25 17:33:54 -08:00
writer.html4 Default CSS tweaks. 2020-11-02 10:51:18 -08:00
writer.html5 Default CSS tweaks. 2020-11-02 10:51:18 -08:00
writer.icml ICML writer: fix image bounding box for custom widths/heights 2020-12-12 14:49:11 +01:00
writer.jats_archiving JATS writer: Ensure that disp-quote is always wrapped in p. 2021-01-19 20:39:58 -08:00
writer.jats_articleauthoring JATS writer: Ensure that disp-quote is always wrapped in p. 2021-01-19 20:39:58 -08:00
writer.jats_publishing JATS writer: Ensure that disp-quote is always wrapped in p. 2021-01-19 20:39:58 -08:00
writer.jira Jira writer: keep image caption as alt attribute 2020-07-17 16:02:40 +02:00
writer.latex latex template: put back amssymb 2020-11-25 16:08:10 -08:00
writer.man Man writer: suppress non-absolute link URLs. 2019-09-23 17:46:39 -07:00
writer.markdown Markdown writer: default to using ATX headings. 2020-11-14 21:33:32 -08:00
writer.mediawiki Shared.compactify: Avoid mixed lists. 2019-02-25 17:33:54 -08:00
writer.ms Ms writer: fix definition lists so indent even when... 2020-03-07 21:54:29 -08:00
writer.muse Use doctemplates 0.3, change type of writerTemplate. 2019-07-28 19:25:45 -07:00
writer.native Shared.compactify: Avoid mixed lists. 2019-02-25 17:33:54 -08:00
writer.opendocument Use latest doclayout. 2019-10-30 21:26:21 -07:00
writer.opml Shared.compactify: Avoid mixed lists. 2019-02-25 17:33:54 -08:00
writer.org Replace org #+KEYWORDS with #+keywords 2020-11-18 14:48:56 +01:00
writer.plain Make plain output plainer. 2019-09-22 11:33:09 -07:00
writer.rst Use new doctemplates, doclayout. 2019-08-25 14:24:31 -07:00
writer.rtf Shared.compactify: Avoid mixed lists. 2019-02-25 17:33:54 -08:00
writer.tei TEI template: improve publicationStmt. 2018-08-16 21:19:03 -07:00
writer.texinfo Shared.compactify: Avoid mixed lists. 2019-02-25 17:33:54 -08:00
writer.textile Changes to build with new doctemplates/doclayout. 2019-10-29 22:21:35 -07:00
writer.xwiki Add XWiki Support (#4167) 2019-04-02 17:27:02 -06:00
writer.zimwiki Zimwiki writer: remove automatic colon prefix before internal images (#5183) 2019-01-01 14:08:38 -08:00
writers-lang-and-dir.context Remove \setupthinrules from default context template. 2021-01-06 14:39:44 -08:00
writers-lang-and-dir.latex latex template: put back amssymb 2020-11-25 16:08:10 -08:00
writers-lang-and-dir.native