aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2018-02-17LaTeX reader: Fixed comments inside citations. Closes #4374.John MacFarlane1-0/+7
2018-02-16TEI writer: Use 'xml:id', not 'id' attribute.John MacFarlane1-31/+31
Closes #4371.
2018-02-16Muse reader: prioritize lists with roman numerals over alphabetical listsAlexander Krotov1-0/+12
This is to make sure "i." starts a roman numbered list, instead of a list with letter "i" (followed by "j", "k", ...").
2018-02-15Docx reader: Pick table width from the longest row or headerdanse3-0/+17
This change is intended to preserve as much of the table content as possible Closes #4360
2018-02-15Muse reader: fix directive parsingAlexander Krotov1-0/+15
This fixes bugs introduced in commit 4bfab8f04c105f111d8d4e1c3ed7f7b5c75dbd19.
2018-02-15Muse writer: use unicode quotes for quoted textAlexander Krotov2-12/+12
2018-02-13AsciiDoc writer: do not output implicit heading IDsAlexander Krotov1-31/+0
Convert to asciidoc-auto_identifiers for old behaviour. Fixes #4363
2018-02-13Muse reader: parse definition lists with multiple descriptionsAlexander Krotov1-7/+20
2018-02-12Muse reader: refactor to avoid reparsingAlexander Krotov1-1/+40
Lists are parsed in linear instead of exponential time now. Contents of block tags, such as <quote>, is parsed directly, without storing it in a string and parsing with parseFromString. Fixed a bug: headers did not terminate lists.
2018-02-12Muse reader: paragraph indentation does not indicate nested quoteAlexander Krotov1-0/+6
Muse allows indentation to indicate quotation or alignment, but only on the top level, not within a <quote> or list. This patch also simplifies the code by removing museInQuote and museInList fields from the state structure. Headers and indented paragraphs are attempted to be parsed only at the topmost level, instead of aborting parsing with guards.
2018-02-11Muse reader: test empty quote tagAlexander Krotov1-0/+5
2018-02-11Muse reader: require that block tags are on separate linesAlexander Krotov1-19/+26
Text::Amuse already explicitly requires it anyway. Supporting block tags on the same line as contents makes it hard to combine closing tag parsers with indentation parsers. Being able to combine parsers is required for no-reparsing refactoring of Muse reader.
2018-02-08Updated rst writer test for template change.John MacFarlane1-4/+0
2018-02-05Muse reader: test that two blank lines after verse can separate list itemsAlexander Krotov1-0/+21
Unlike paragraph and <quote> tag parsers, verse parser consumes newline. For this reason only three or more blank lines can separate list items.
2018-02-05Muse reader: test that lists can be separated with two blanklines after ↵Alexander Krotov1-0/+27
blockquote Existing tests only checked this for paragraphs.
2018-02-03Muse writer: write image width specified in percent in Text::Amuse modeAlexander Krotov1-0/+3
2018-01-30Muse writer: don't wrap displayMath into <verse>Alexander Krotov2-2/+2
<verse> is a block tag and displayMath is an inline element. Writing <verse> around displayMath could result in nested <verse> tags.
2018-01-29Muse writer: escape nonbreaking space ("~~")Alexander Krotov1-0/+1
2018-01-28Muse reader: fix parsing of trailing whitespaceAlexander Krotov1-0/+6
Newline after whitespace now results in softbreak instead of space.
2018-01-27Docx writer tests: correct test name.Jesse Rosenthal1-1/+1
2018-01-27Docx writer tests: Add tests for custom stylesJesse Rosenthal4-0/+10
2018-01-27Docx writer tests: Use new golden frameworkJesse Rosenthal27-127/+120
These are based off the reader tests, with some removed (where the reader output was identical, based on different docx inputs). There are still more to be added. In particular, tests for custom-styles need to be added. All golden docx files have been checked in MS Word 2013 (windows). There is no corruption. There is questionable output in the `tables` test: the three tables seemed to be joined. This will be addressed in a future commit, and the golden docx file will be changed.
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 Menke4-39/+66
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 Menke2-4/+4
2018-01-22Powerpoint writer tests: add tests for two-column layout and imagesJesse Rosenthal5-0/+24
Powerpoint output checked in MS PowerPoint 2013 (Windows)
2018-01-22Powerpoint writer: Add further testsJesse Rosenthal5-0/+17
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 Rosenthal6-157/+196
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-20Markdown reader: Fix parsing bug with nested fenced divs.John MacFarlane1-0/+18
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.
2018-01-20RST reader: fix parsing of headers with trailing space.John MacFarlane1-0/+7
This was a regression in pandoc 2.0. Closes #4280.
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 Krotov2-10/+16
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-17Markdown reader: don't coalesce adjacent raw LaTeX blocks...John MacFarlane2-1/+11
if they are separated by a blank line. See lierdakil/pandoc-crossref#160 for motivation.