summaryrefslogtreecommitdiff
path: root/test/Tests/Writers/OOXML.hs
AgeCommit message (Collapse)Author
2023-12-18test(docx): also compare number of childrenEdwin Török
This detects if a tag gets added/removed, or moves within the hierarchy. Signed-off-by: Edwin Török <edwin@etorok.net>
2021-10-04OOXML tests: use pretty-printed form to display diffs.John MacFarlane
Otherwise everything is on one line and the diff is uninformative.
2021-10-02Fix compareXML helper in Tests.Writers.OOXML.John MacFarlane
Given how it is used, we were getting "mine" and "good" flipped in the test results.
2021-08-17OOXML tests: silence warnings.John MacFarlane
These can make the test output confusing, making people think tests are failing when they're passing.
2021-08-17Don’t compare cdLine in OOXML golden testsEmily Bourke
The `cdLine` field gives the line of the file some CData was found on. I don’t think this is a difference that should fail these golden tests, as the XML should still be parsable if nothing else has changed.
2021-08-17Provide more detailed XML diff in testsEmily Bourke
I had some failing tests and couldn’t tell what was different in the XML. Updating the comparison to return what’s different made it easier to figure out what was wrong, and I think will be helpful for others in future.
2021-06-29Docx writer: Add table numbering for captioned tables.John MacFarlane
The numbers are added using fields, so that Word can create a list of tables that will update automatically.
2021-02-16Rename Text.Pandoc.XMLParser -> Text.Pandoc.XML.Light...John MacFarlane
..and add new definitions isomorphic to xml-light's, but with Text instead of String. This allows us to keep most of the code in existing readers that use xml-light, but avoid lots of unnecessary allocation. We also add versions of the functions from xml-light's Text.XML.Light.Output and Text.XML.Light.Proc that operate on our modified XML types, and functions that convert xml-light types to our types (since some of our dependencies, like texmath, use xml-light). Update golden tests for docx and pptx. OOXML test: Use `showContent` instead of `ppContent` in `displayDiff`. Docx: Do a manual traversal to unwrap sdt and smartTag. This is faster, and needed to pass the tests. Benchmarks: A = prior to 8ca191604dcd13af27c11d2da225da646ebce6fc (Feb 8) B = as of 8ca191604dcd13af27c11d2da225da646ebce6fc (Feb 8) C = this commit | Reader | A | B | C | | ------- | ----- | ------ | ----- | | docbook | 18 ms | 12 ms | 10 ms | | opml | 65 ms | 62 ms | 35 ms | | jats | 15 ms | 11 ms | 9 ms | | docx | 72 ms | 69 ms | 44 ms | | odt | 78 ms | 41 ms | 28 ms | | epub | 64 ms | 61 ms | 56 ms | | fb2 | 14 ms | 5 ms | 4 ms |
2021-02-07Avoid unnecessary use of NoImplicitPrelude pragma (#7089)Albert Krewinkel
2020-09-13Fix hlint suggestions, update hlint.yaml (#6680)Christian Despres
* Fix hlint suggestions, update hlint.yaml Most suggestions were redundant brackets. Some required LambdaCase. The .hlint.yaml file had a small typo, and didn't ignore camelCase suggestions in certain modules.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-02-27Powerpoint writer: use `trim` from SharedJesse Rosenthal
Instead of writing my own.
2018-01-25Tests: Abstract powerpoint tests out to OOXML tests.Jesse Rosenthal
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.