aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
AgeCommit message (Collapse)AuthorFilesLines
2018-01-25Tests: Abstract powerpoint tests out to OOXML tests.Jesse Rosenthal2-175/+188
There is very little pptx-specific in these tests, so we abstract out the basic testing function so it can be used for docx as well. This should allow us to catch some errors in the docx writer that slipped by the roundtrip testing.
2018-01-25ConTeXt writer: new section syntax and --section-divs (#4295)Henri Menke1-1/+24
Fixes #2609. This PR introduces the new-style section headings: `\section[my-header]{My Header}` -> `\section[title={My Header},reference={my-header}]`. On top of this, the ConTeXt writer now supports the `--section-divs` option to write sections in the fenced style, with `\startsection` and `\stopsection`.
2018-01-24Muse reader: fix matching of closing inline tagsAlexander Krotov1-0/+3
2018-01-23Powerpoint writer tests: hlint cleanups.Jesse Rosenthal1-14/+12
2018-01-23ConTeXt writer: xtables: correct wrong usage of captionHenri Menke1-1/+1
2018-01-22Powerpoint writer tests: add tests for two-column layout and imagesJesse Rosenthal1-0/+10
Powerpoint output checked in MS PowerPoint 2013 (Windows)
2018-01-22Powerpoint writer: Add further testsJesse Rosenthal1-0/+15
Tests added for: - table of contents - endnotes - endnotes with table of contents Powerpoint output checked in MS PowerPoint 2013 (Windows)
2018-01-22Powerpoint writer tests: simplify updating functionJesse Rosenthal1-7/+1
We had previously re-read the native file and converted it to Powerpoint. But we have already done that in constructing the test archive. So now we just convert the archive back to a bytestring and write it to disk.
2018-01-22Powerpoint tests: Convert to golden testsJesse Rosenthal1-136/+147
This will allow us to rebuild the pptx files in the test dir more easily if we make a change in the writer.
2018-01-22Muse writer: join code with different attributes during normalizationAlexander Krotov1-0/+1
2018-01-22Muse writer: indent lists inside DivAlexander Krotov1-1/+3
2018-01-21Powerpoint writer tests: New test framework for pptx.Jesse Rosenthal1-157/+184
Previously we had tested certain properties of the output PowerPoint slides. Corruption, though, comes as the result of a numebr of interrelated issues in the output pptx archive. This is a new approach, which compares the output of the Powerpoint writer with files that we know to (a) not be corrupt, and (b) to show the desired output behavior (details below). This commit introduces three tests using the new framework. More will follow. The test procedure: given a native file and a pptx file, we generate a pptx archive from the native file, and then test: 1. Whether the same files are in the two archives 2. Whether each of the contained xml files is the same. (We skip time entries in `docProps/core.xml`, since these are derived from IO. We just check to make sure that they're there in the same way in both files.) 3. Whether each of the media files is the same. Note that steps 2 and 3, though they compare multiple files, are one test each, since the number of files depends on the input file (if there is a failure, it will only report the first failed file comparison in the test failure).
2018-01-20Muse reader: remove multiple descriptions during round-trip testsAlexander Krotov1-0/+6
2018-01-20Muse reader: enable definition lists in round-trip testAlexander Krotov1-3/+2
2018-01-19hlint code improvements.John MacFarlane23-146/+141
2018-01-19Merge pull request #4259 from italia/4248John MacFarlane1-0/+10
in RST writer insert comment between lists and quotes, closes #4248
2018-01-20Muse reader: fix parsing of nested definition listsAlexander Krotov1-1/+11
2018-01-19in RST writer insert comment between lists and quotes, closes #4248danse1-0/+10
2018-01-19Muse writer: support definitions with multiple descriptionsAlexander Krotov1-2/+11
Muse reader does not support this syntax yet, but Emacs Muse parses it correctly.
2018-01-19Muse reader: require only one space for nested definition list indentationAlexander Krotov1-0/+3
2018-01-19Muse reader: parse definition list terms without parseFromStringAlexander Krotov1-0/+2
2018-01-18Muse reader: fix parsing of code at the beginning of paragraphAlexander Krotov1-0/+3
2018-01-18Muse reader: refactor definition list parsingAlexander Krotov1-11/+0
Test with wrong indentation is removed, because now it is parsed as nested lists. Emacs Muse and Text::Amuse don't have the same behavior anyway.
2018-01-18Muse reader: parse "~~" as non-breaking space in Text::Amuse modeAlexander Krotov1-2/+2
Latest Text::Amuse supports "~~"
2018-01-18Muse reader: refactor list parsingAlexander Krotov1-17/+52
Now list item contents is parsed as blocks, without resorting to parseFromString. Only the first line of paragraph has to be indented now, just like in Emacs Muse and Text::Amuse. Definition lists are not refactored yet. See also: issue #3865.
2018-01-16Docx reader: Add test for hyperlinks in instrText tagJesse Rosenthal1-0/+4
This is difficult to recreate with a modern version of Word, so I'm using the file submitted with the bug report. It would be preferable to find a smaller example with Latin characters, though, so as not to confuse the issue being tested.
2018-01-15ConTeXt writer: Use xtables instead of Tables (#4223)Henri Menke1-0/+55
- Default to xtables for context output. - Added `ntb` extension (affecting context writer only) to use Natural Tables instead. - Added `Ext_ntb` constructor to `Extension` (API change).
2018-01-14Markdown reader: Improved inlinesInBalancedBrackets.John MacFarlane1-1/+1
The change both improves performance and fixes a regression whereby normal citations inside inline notes were not parsed correctly. Closes jgm/pandoc-citeproc#315.
2018-01-14Shorten unbalanced brackets test.John MacFarlane1-1/+1
It was taking a lot of time.
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.