aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers
AgeCommit message (Collapse)AuthorFilesLines
2018-03-21Muse writer: don't align ordered list itemsAlexander Krotov1-6/+6
It leads to problems with round-trip test, because aligned line blocks can't be read back.
2018-03-21Powerpoint writer: add tests for improved speaker notes.Jesse Rosenthal1-0/+4
Tests speaker notes appearing after (and inside of) separating blocks. Output checked on Windows10 (archlinux virtualbox), PowerPoint 2013. Not corrupted, and output as expected.
2018-03-20Muse writer: escape "]" in image titleAlexander Krotov1-0/+1
2018-03-20Muse writer: escape ";" to avoid accidental commentsAlexander Krotov1-0/+1
2018-03-20Muse writer: escape "]" brackets in URLs as "%5D"Alexander Krotov1-0/+15
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane17-0/+34
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-17hlint fixes.John MacFarlane1-1/+1
2018-03-17RST writer: filter out empty inline containers (#4434).Francesco Occhipinti1-7/+11
There is nothing in RST that corresponds to e.g. `Emph []`, so we just filter out elements like this.
2018-03-17RST writer: strip whitespace within inlines, closes #4327 (#4329)Francesco Occhipinti1-0/+9
+ Whitespace is ignored at the beginning and end of emphasis, as per <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup>. + Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`.
2018-03-12Muse writer: support spans with anchorsAlexander Krotov1-1/+5
2018-03-07Muse writer: replace smallcaps with emphasis before normalizationAlexander Krotov1-0/+1
2018-03-07Muse writer: output smallcaps as emphasisAlexander Krotov1-1/+1
2018-03-07Muse writer: write empty inline lists as <verbatim></verbatim>Alexander Krotov1-0/+9
2018-03-07Muse writer: escape "-" to avoid creating bullet listsAlexander Krotov1-0/+9
2018-03-06Muse writer: fix math expansion for more than one expression per paragraphAlexander Krotov1-0/+1
2018-03-05Remove extraneous, significant whitespace in JATS writer output (#4335)Nokome Bentley1-26/+12
This patch fixes some cases where the JATS writer was introducing semantically significant whitespace by indenting and wrapping tags. Note that the JATS spec has a content model for `<p>` tags of `(#PCDATA | ...`. Any tag where `#PCDATA` children are possible should not have any indentation. The same is true for `<th>`, `<td>`, `<term>`, `<label>`.
2018-03-05Muse writer: expand math before inline list normalizationAlexander Krotov1-0/+1
2018-03-02Muse writer: join strings during inline normalizationAlexander Krotov1-0/+1
2018-02-28Muse writer: change verse markupAlexander Krotov1-5/+3
Use "> " instead of <verse> tag
2018-02-28Muse writer: remove empty strings during inline normalizationAlexander Krotov1-0/+1
2018-02-27Powerpoint writer: use `trim` from SharedJesse Rosenthal1-2/+0
Instead of writing my own.
2018-02-27Powerpoint writer: add test for table and list syntaxJesse Rosenthal1-0/+9
These were never added when the tests were first created. Output files checked in MS PowerPoint 2013 (Windows 10, VBox). No corruption, and output as expected.
2018-02-27Powerpoint writer: Remove empty slidesJesse Rosenthal1-0/+4
Make sure there are no empty slides in the pptx output. Because of the way that slides were split, these could be accidentally produced by comments after images. When animations are added, there will be a way to add an empty slide with either incremental lists or pauses. Test outputs checked with MS PowerPoint (Office 2013, Windows 10, VBox). Both files have expected output and are not corrupted.
2018-02-23Muse writer: don't indent nested definition listsAlexander Krotov1-2/+2
2018-02-19Powerpoint writer tests: Test everything with template as wellJesse Rosenthal1-48/+72
Modify the PowerPoint tests to run all the tests with template (--reference-doc) as well. Because there are so many interlocking pieces, bugs can pop up in weird places when using templates, since it changes how the writer builds its output file. For example, I recently discovered a bug in which speaker notes worked fine and templating worked fine elsewhere, but templating with speaker notes produced a file that would crash MS PowerPoint. That particular bug was fixed, but this will forces us to check for that with each new change.
2018-02-18Powerpoint writer: Add tests for speaker notes.Jesse Rosenthal1-0/+5
2018-02-15Muse writer: use unicode quotes for quoted textAlexander Krotov1-4/+4
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 Krotov1-1/+1
<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-27Docx writer tests: correct test name.Jesse Rosenthal1-1/+1
2018-01-27Docx writer tests: Add tests for custom stylesJesse Rosenthal1-0/+10
2018-01-27Docx writer tests: Use new golden frameworkJesse Rosenthal1-127/+113
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 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-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-19hlint code improvements.John MacFarlane8-37/+34
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-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-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.
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.