aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers
AgeCommit message (Collapse)AuthorFilesLines
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.
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.