aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
AgeCommit message (Collapse)AuthorFilesLines
2018-01-13data/pandoc.lua: add attr, listAttributes accessorsAlbert Krewinkel1-2/+9
Elements with attributes got an additional `attr` accessor. Attributes were accessible only via the `identifier`, `classes`, and `attributes`, which was in conflict with the documentation, which indirectly states that such elements have the an `attr` property.
2018-01-13data/pandoc.lua: accept single block as singleton listAlbert Krewinkel1-4/+14
Every constructor which accepts a list of blocks now also accepts a single block element for convenience. Furthermore, strings are accepted as shorthand for `{pandoc.Str "text"}` in constructors.
2018-01-13data/pandoc.lua: accept singleton inline as a listAlbert Krewinkel1-1/+6
Every constructor which accepts a list of inlines now also accepts a single inline element for convenience.
2018-01-12Lua filters: improve error messagesAlbert Krewinkel1-0/+10
Provide more context about the task which caused an error.
2018-01-12Lua filters: make PANDOC_READER_OPTIONS availableAlbert Krewinkel1-1/+2
The options which were used to read the document are made available to Lua filters via the `PANDOC_READER_OPTIONS` global.
2018-01-08data/pandoc.lua: cleanup code, remove cruftAlbert Krewinkel1-2/+2
2018-01-07Lua: make pandoc-types version available as PANDOC_API_VERSIONAlbert Krewinkel1-1/+8
The current pandoc-types version is made available to Lua programs in the global PANDOC_API_VERSION. It contains the version as a list of numbers.
2018-01-07Lua: make pandoc version available as PANDOC_VERSIONAlbert Krewinkel1-13/+25
The current pandoc version is made available to Lua programs in the global PANDOC_VERSION. It contains the version as a list of numbers.
2018-01-03Powerpoint writer: Set default slidelevel correctly.Jesse Rosenthal1-1/+1
We had previously defaulted to slideLevel 2. Now we use the correct behavior of defaulting to the highest level header followed by content. We change an expected test result to match this behavior.
2018-01-02Docx reader: Add tests for paragraph insertion/deletion.Jesse Rosenthal1-0/+12
2017-12-31Docx reader: tests for overlapping targets (anchor spans).Jesse Rosenthal1-0/+4
2017-12-30Docx reader: tests for removing unused anchors.Jesse Rosenthal1-0/+4
2017-12-30Muse reader: enable round trip testAlexander Krotov1-10/+9
Closes #4107
2017-12-29Powerpoint Writer tests: Add quickcheck tests for content types.Jesse Rosenthal1-14/+77
We want to make sure we always have an override for each xml file in the content types file.
2017-12-29Powerpoint writer test: more slide number testsJesse Rosenthal1-4/+9
Add test for custom slide-level header, and notes slides.
2017-12-28Powerpoint writer tests: use IO.John MacFarlane2-336/+18
Otherwise we can't find the data files when compiled with -embed_data_files.
2017-12-28Use insertInFileTree in powerpoint test.John MacFarlane1-2/+1
2017-12-28Text.Pandoc.Class: add insertInFileTree (API change).John MacFarlane1-7/+2
This gives a pure way to insert an ersatz file into a FileTree. In addition, we normalize paths both on insertion and on lookup, so that "foo" and "./foo" will be judged equivalent.
2017-12-28Fixed warning in powerpoint writer test.John MacFarlane1-3/+0
2017-12-28PowerPoint writer: Introduce beginning of testsJesse Rosenthal2-0/+423
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-28Org smart test: drop superfluous importAlbert Krewinkel1-1/+1
Keeps GHC 7.8 and GHC 7.10 happy.
2017-12-28Org reader: support minlevel option for includesAlbert Krewinkel1-1/+77
The level of headers in included files can be shifted to a higher level by specifying a minimum header level via the `:minlevel` parameter. E.g. `#+include: "tour.org" :minlevel 1` will shift the headers in tour.org such that the topmost headers become level 1 headers. Fixes: #4154
2017-12-28Break-up org reader test fileAlbert Krewinkel13-1864/+2007
The org reader test file had grown large, to the point that editor performance was negatively affected in some cases. The tests are spread over multiple submodules, and re-combined into a tasty TestTree in the main org reader test file.
2017-12-27Added tests for custom writer.John MacFarlane1-0/+6
2017-12-27Docx reader: add tests for structured document tags unwrapping.Jesse Rosenthal1-0/+4
2017-12-23Lua modules: add function pandoc.utils.hierarchicalizeAlbert Krewinkel1-1/+2
Convert list of Pandoc blocks into (hierarchical) list of Elements.
2017-12-23Lua modules: add function pandoc.utils.normalize_dateAlbert Krewinkel1-1/+2
The function parses a date and converts it (if possible) to "YYYY-MM-DD" format.
2017-12-23Lua modules: add function pandoc.utils.to_roman_numeralAlbert Krewinkel1-0/+1
The function allows conversion of numbers below 4000 into roman numerals.
2017-12-22Lua modules: add stringify function to pandoc.utilsAlbert Krewinkel1-0/+1
The new function `pandoc.utils.stringify` converts any AST element to a string with formatting removed.
2017-12-21Merge pull request #4177 from stencila/jats-xml-readerJohn MacFarlane3-1/+124
Add Basic JATS reader based on DocBook reader
2017-12-22Improve support for code language in JATSHamish Mackenzie2-1/+11
2017-12-21Muse reader: parse anchors immediately after headings as IDsAlexander Krotov2-0/+17
2017-12-20Test more pandoc Lua module functionsAlbert Krewinkel1-0/+11
The functions `sha1`, `read`, and `pipe` are now tested. Change: minor
2017-12-20Muse reader: require that note references does not start with 0Alexander Krotov1-0/+14
2017-12-20Add Basic JATS reader based on DocBook readerHamish Mackenzie2-0/+113
2017-12-19Muse reader: parse empty comments correctlyAlexander Krotov1-0/+2
2017-12-15Added tests of latex tokenizer.John MacFarlane1-1/+18
This should help prevent regressions like #4159.
2017-12-14Merge pull request #4148 from stencila/jats-figuresJohn MacFarlane1-0/+119
fig, table-wrap & caption Divs for JATS writer
2017-12-13Merge pull request #4153 from tarleb/unify-lua-initJohn MacFarlane1-13/+18
Unify lua initalization
2017-12-13Docx writer: Add tests for list continuation.Jesse Rosenthal1-0/+8
2017-12-13Custom writer: use init file to setup Lua interpreterAlbert Krewinkel1-13/+18
The same init file (`data/init`) that is used to setup the Lua interpreter for Lua filters is also used to setup the interpreter of custom writers.lua.
2017-12-13fig, table-wrap & caption Divs for JATS writerHamish Mackenzie1-0/+119
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-12-02Lua filters: refactor lua module handlingAlbert Krewinkel1-13/+11
The integration with Lua's package/module system is improved: A pandoc-specific package searcher is prepended to the searchers in `package.searchers`. The modules `pandoc` and `pandoc.mediabag` can now be loaded via `require`.
2017-12-06hlint Muse reader and testsAlexander Krotov1-4/+4
2017-12-06Muse reader: add test for #disable-tables directive in Emacs modeAlexander Krotov1-7/+13
2017-12-06Muse reader: don't allow emphasis to be preceded by letterAlexander Krotov1-0/+4
2017-12-04Add `empty_paragraphs` extension.John MacFarlane1-20/+7
* Deprecate `--strip-empty-paragraphs` option. Instead we now use an `empty_paragraphs` extension that can be enabled on the reader or writer. By default, disabled. * Add `Ext_empty_paragraphs` constructor to `Extension`. * Revert "Docx reader: don't strip out empty paragraphs." This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b. * Implement `empty_paragraphs` extension in docx reader and writer, opendocument writer, html reader and writer. * Add tests for `empty_paragraphs` extension.
2017-12-04Muse reader: add underline support in Emacs Muse modeAlexander Krotov1-0/+4
2017-12-02Docx reader: don't strip out empty paragraphs.John MacFarlane1-7/+20
We now have the `--strip-empty-paragraphs` option for that, if you want it. Closes #2252. Updated docx reader tests. We use stripEmptyParagraphs to avoid changing too many tests. We should add new tests for empty paragraphs.
2017-11-29Muse reader: correctly remove indentation from notesAlexander Krotov1-0/+8
Exactly one space is required and considered to be part of the marker.