summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Powerpoint writer tests: New test framework for pptx.Jesse Rosenthal2018-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Markdown reader: Fix parsing bug with nested fenced divs.John MacFarlane2018-01-20
| | | | | | | | | Closes #4281. Previously we allowed "nonindent spaces" before the opening and closing `:::`, but this interfered with list parsing, so now we require the fences to be flush with the margin of the containing block.
* RST reader: fix parsing of headers with trailing space.John MacFarlane2018-01-20
| | | | | | This was a regression in pandoc 2.0. Closes #4280.
* Muse reader: remove multiple descriptions during round-trip testsAlexander Krotov2018-01-20
|
* Muse reader: enable definition lists in round-trip testAlexander Krotov2018-01-20
|
* hlint code improvements.John MacFarlane2018-01-19
|
* Merge pull request #4259 from italia/4248John MacFarlane2018-01-19
|\ | | | | in RST writer insert comment between lists and quotes, closes #4248
| * in RST writer insert comment between lists and quotes, closes #4248danse2018-01-19
| |
* | Muse reader: fix parsing of nested definition listsAlexander Krotov2018-01-20
|/
* Muse writer: support definitions with multiple descriptionsAlexander Krotov2018-01-19
| | | | | Muse reader does not support this syntax yet, but Emacs Muse parses it correctly.
* Muse reader: require only one space for nested definition list indentationAlexander Krotov2018-01-19
|
* Muse reader: parse definition list terms without parseFromStringAlexander Krotov2018-01-19
|
* Muse reader: fix parsing of code at the beginning of paragraphAlexander Krotov2018-01-18
|
* Muse reader: refactor definition list parsingAlexander Krotov2018-01-18
| | | | | | | 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.
* Muse reader: parse "~~" as non-breaking space in Text::Amuse modeAlexander Krotov2018-01-18
| | | | Latest Text::Amuse supports "~~"
* Muse reader: refactor list parsingAlexander Krotov2018-01-18
| | | | | | | | | | | | | 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.
* Markdown reader: don't coalesce adjacent raw LaTeX blocks...John MacFarlane2018-01-17
| | | | | | if they are separated by a blank line. See lierdakil/pandoc-crossref#160 for motivation.
* Markdown writer: fix cell width calculation.John MacFarlane2018-01-16
| | | | | | | Previously we could get ever-lengthening cell widths when a table was run repeatedly through `pandoc -f markdown -t markdown`. This patch stabilizes the relative cell widths. Closes #4265.
* Docx reader: Add test for hyperlinks in instrText tagJesse Rosenthal2018-01-16
| | | | | | | 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.
* ConTeXt writer: Use xtables instead of Tables (#4223)Henri Menke2018-01-15
| | | | | | - 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).
* RST reader: add aligned environment when needed in math.John MacFarlane2018-01-14
| | | | | | | | | rst2latex.py uses an align* environment for math in `.. math::` blocks, so this math may contain line breaks. If it does, we put the math in an `aligned` environment to simulate rst2latex.py's behavior. Closes #4254.
* Markdown reader: Improved inlinesInBalancedBrackets.John MacFarlane2018-01-14
| | | | | | | | The change both improves performance and fixes a regression whereby normal citations inside inline notes were not parsed correctly. Closes jgm/pandoc-citeproc#315.
* Shorten unbalanced brackets test.John MacFarlane2018-01-14
| | | | It was taking a lot of time.
* LaTeX reader: pass through macro defs in rawLaTeXBlock...John MacFarlane2018-01-13
| | | | | | | | | | even if the `latex_macros` extension is set. This reverts to earlier behavior and is probably safer on the whole, since some macros only modify things in included packages, which pandoc's macro expansion can't modify. Closes #4246.
* data/pandoc.lua: add attr, listAttributes accessorsAlbert Krewinkel2018-01-13
| | | | | | | 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.
* data/pandoc.lua: accept single block as singleton listAlbert Krewinkel2018-01-13
| | | | | | 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.
* LaTeX reader: allow macro definitions inside macros.John MacFarlane2018-01-13
| | | | | | | | | | | | Previously we went into an infinite loop with ``` \newcommand{\noop}[1]{#1} \noop{\newcommand{\foo}[1]{#1}} \foo{hi} ``` See #4253.
* data/pandoc.lua: accept singleton inline as a listAlbert Krewinkel2018-01-13
| | | | | Every constructor which accepts a list of inlines now also accepts a single inline element for convenience.
* Lua filters: improve error messagesAlbert Krewinkel2018-01-12
| | | | Provide more context about the task which caused an error.
* Lua filters: make PANDOC_READER_OPTIONS availableAlbert Krewinkel2018-01-12
| | | | | The options which were used to read the document are made available to Lua filters via the `PANDOC_READER_OPTIONS` global.
* RST reader: better handling for headers with an anchor.John MacFarlane2018-01-10
| | | | | | Instead of creating a div containing the header, we put the id directly on the header. This way header promotion will work properly. Closes #4240.
* Fixed a test case so it works on windows too.John MacFarlane2018-01-09
|
* HTML writer: Fixed footnote backlinks with --id-prefix.John MacFarlane2018-01-09
| | | | Closes #4235.
* data/pandoc.lua: cleanup code, remove cruftAlbert Krewinkel2018-01-08
|
* Lua: make pandoc-types version available as PANDOC_API_VERSIONAlbert Krewinkel2018-01-07
| | | | | | 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.
* Lua: make pandoc version available as PANDOC_VERSIONAlbert Krewinkel2018-01-07
| | | | | The current pandoc version is made available to Lua programs in the global PANDOC_VERSION. It contains the version as a list of numbers.
* Powerpoint writer: Set default slidelevel correctly.Jesse Rosenthal2018-01-03
| | | | | | 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.
* Docx reader: Add tests for paragraph insertion/deletion.Jesse Rosenthal2018-01-02
|
* Docx reader: tests for overlapping targets (anchor spans).Jesse Rosenthal2017-12-31
|
* Docx Reader: Combine adjacent anchors.Jesse Rosenthal2017-12-31
| | | | | | | | | | | | | | There isn't any reason to have numberous anchors in the same place, since we can't maintain docx's non-nesting overlapping. So we reduce to a single anchor, and have all links pointing to one of the overlapping anchors point to that one. This changes the behavior from commit e90c714c7 slightly (use the first anchor instead of the last) so we change the expected test result. Note that because this produces a state that has to be set after every invocation of `parPartToInlines`, we make the main function into a primed subfunction `parPartToInlines'`, and make `parPartToInlines` a wrapper around that.
* Docx reader: tests for removing unused anchors.Jesse Rosenthal2017-12-30
|
* Muse reader: enable round trip testAlexander Krotov2017-12-30
| | | | Closes #4107
* Docx reader: Read multiple children of w:sdtContents`Jesse Rosenthal2017-12-30
| | | | | | | | Previously we had only read the first child of an sdtContents tag. Now we replace sdt with all children of the sdtContents tag. This changes the expected test result of our nested_anchors test, since now we read docx's generated TOCs.
* Powerpoint Writer tests: Add quickcheck tests for content types.Jesse Rosenthal2017-12-29
| | | | | We want to make sure we always have an override for each xml file in the content types file.
* Powerpoint writer test: more slide number testsJesse Rosenthal2017-12-29
| | | | Add test for custom slide-level header, and notes slides.
* Merge pull request #4170 from oltolm/opendocumentJohn MacFarlane2017-12-28
|\ | | | | improve formatting of formulas in OpenDocument
| * improve formatting of formulas in OpenDocumentoltolm2017-12-28
| |
* | Powerpoint writer tests: use IO.John MacFarlane2017-12-28
| | | | | | | | | | Otherwise we can't find the data files when compiled with -embed_data_files.
* | Use insertInFileTree in powerpoint test.John MacFarlane2017-12-28
| |
* | Text.Pandoc.Class: add insertInFileTree (API change).John MacFarlane2017-12-28
| | | | | | | | | | | | | | 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.