aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers
AgeCommit message (Collapse)AuthorFilesLines
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.
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-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-21Merge pull request #4177 from stencila/jats-xml-readerJohn MacFarlane1-1/+6
Add Basic JATS reader based on DocBook reader
2017-12-22Improve support for code language in JATSHamish Mackenzie1-1/+6
2017-12-21Muse reader: parse anchors immediately after headings as IDsAlexander Krotov1-0/+5
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-11-24Muse writer: test that inline math conversion result is normalizedAlexander Krotov1-0/+1
Without normalization this test produced <em>a</em><em>b</em><em>c</em>
2017-11-24Muse: move inline list normalization to writerAlexander Krotov1-0/+1
2017-11-22Muse writer: escape hash symbolAlexander Krotov1-0/+2
2017-11-22Muse writer: escape "----" to avoid accidental horizontal rulesAlexander Krotov1-0/+1
2017-11-22Muse writer: escape only </code> inside code tagAlexander Krotov1-2/+1
Additional <verbatim> is not needed as <code> is verbatim already.
2017-11-13Replace "emacs" extension with "amuse" extensionAlexander Krotov1-1/+3
It makes clear that extension is related to Muse markup.
2017-11-01FB2 writer: Add "unrecognised" genre to <title-info>Alexander Krotov1-1/+1
XML schema requires at least one genre.
2017-11-01FB2 writer: remove <annotation> from <body>Alexander Krotov1-1/+1
<annotation> is not allowed inside <body> according to FictionBook2 XML schema. Besides that, the same information is already placed inside <description>. Related bug: #2424
2017-10-28Add new style FB2 testsAlexander Krotov1-0/+34
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane2-6/+6
2017-08-10Fixed writer tests not to use writerUserDataDir.John MacFarlane1-3/+3
2017-08-08Muse writer: insert two blanklines between lists of the same type (#3844)Alexander1-0/+73
2017-07-15Fix docx writer test for ghc 8.2.1.John MacFarlane1-1/+9
Workaround for different behavior of Data.Unique in different ghc versions.
2017-07-15Rearrange docx writer roundtrip test.John MacFarlane1-4/+4
I'm hoping this gives reproducible results on ghc 8.2.1.
2017-07-14Refactored compareOutput in docx writer testJohn MacFarlane1-7/+6
2017-07-12Muse writer: indent lists inside <quote> with at least one space (#3795)Alexander Krotov1-0/+11