summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordanse <f.occhipinti@gmail.com>2018-02-12 17:10:29 +0100
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-02-15 15:06:01 -0500
commite6ff7f79861d3088f8cba2b22d86d9f75db73f6a (patch)
tree885440592bae86a5d5178ba650a471f8dc2acdb3 /test
parent82a0ceaf18e589e8916fbd70e0b13e5945bcc99a (diff)
Docx reader: Pick table width from the longest row or header
This change is intended to preserve as much of the table content as possible Closes #4360
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Docx.hs4
-rw-r--r--test/docx/table_variable_width.docxbin0 -> 10006 bytes
-rw-r--r--test/docx/table_variable_width.native13
3 files changed, 17 insertions, 0 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 89a605bf7..9c9a8179b 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -273,6 +273,10 @@ tests = [ testGroup "inlines"
"docx/table_one_row.docx"
"docx/table_one_row.native"
, testCompare
+ "tables with variable width"
+ "docx/table_variable_width.docx"
+ "docx/table_variable_width.native"
+ , testCompare
"code block"
"docx/codeblock.docx"
"docx/codeblock.native"
diff --git a/test/docx/table_variable_width.docx b/test/docx/table_variable_width.docx
new file mode 100644
index 000000000..899357968
--- /dev/null
+++ b/test/docx/table_variable_width.docx
Binary files differ
diff --git a/test/docx/table_variable_width.native b/test/docx/table_variable_width.native
new file mode 100644
index 000000000..9d3b961df
--- /dev/null
+++ b/test/docx/table_variable_width.native
@@ -0,0 +1,13 @@
+[Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0,0.0,0.0]
+ [[]
+ ,[]
+ ,[Plain [Str "h3"]]
+ ,[Plain [Str "h4"]]
+ ,[Plain [Str "h5"]]]
+ [[[Plain [Str "c11"]]
+ ,[]
+ ,[]]
+ ,[[]
+ ,[Plain [Str "c22"]]
+ ,[Plain [Str "c23"]]
+ ,[]]]]