aboutsummaryrefslogtreecommitdiff
path: root/test/docx
diff options
context:
space:
mode:
authordespresc <christian.j.j.despres@gmail.com>2020-03-28 18:22:48 -0400
committerdespresc <christian.j.j.despres@gmail.com>2020-04-15 23:03:22 -0400
commit7254a2ae0ba40b29c04b8924f27739614229432b (patch)
tree114e3143953451e3212511e7bf2e178548d3e1bd /test/docx
parent83c1ce1d77d3ef058e4e5c645a8eb0379fab780f (diff)
downloadpandoc-7254a2ae0ba40b29c04b8924f27739614229432b.tar.gz
Implement the new Table type
Diffstat (limited to 'test/docx')
-rw-r--r--test/docx/0_level_headers.native48
-rw-r--r--test/docx/sdt_elements.native34
-rw-r--r--test/docx/table_one_row.native24
-rw-r--r--test/docx/table_variable_width.native53
-rw-r--r--test/docx/table_with_list_cell.native20
-rw-r--r--test/docx/tables.native108
6 files changed, 204 insertions, 83 deletions
diff --git a/test/docx/0_level_headers.native b/test/docx/0_level_headers.native
index 6d8269b21..3ee60c2f4 100644
--- a/test/docx/0_level_headers.native
+++ b/test/docx/0_level_headers.native
@@ -1,15 +1,39 @@
-[Table [] [AlignDefault] [0.0]
- [[]]
- [[[]]
- ,[[Plain [Str "User\8217s",Space,Str "Guide"]]]
- ,[[]]
- ,[[]]
- ,[[]]
- ,[[Plain [Str "11",Space,Str "August",Space,Str "2017"]]]
- ,[[]]
- ,[[]]
- ,[[]]
- ,[[]]]
+[Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "User\8217s",Space,Str "Guide"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "11",Space,Str "August",Space,Str "2017"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []]]
+ []
,Para [Str "CONTENTS"]
,Para [Strong [Str "Section",Space,Str "Page"]]
,Para [Str "FIGURES",Space,Str "iv"]
diff --git a/test/docx/sdt_elements.native b/test/docx/sdt_elements.native
index 7f7768728..ad48dab5c 100644
--- a/test/docx/sdt_elements.native
+++ b/test/docx/sdt_elements.native
@@ -1,10 +1,24 @@
-[Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
- [[]
- ,[]
- ,[]]
- [[[Plain [Strong [Str "col1Header"]]]
- ,[Plain [Strong [Str "col2Header"]]]
- ,[Plain [Strong [Str "col3Header"]]]]
- ,[[Plain [Str "col1",Space,Str "content"]]
- ,[Plain [Str "Body",Space,Str "copy"]]
- ,[Plain [Str "col3",Space,Str "content"]]]]]
+[Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing),(AlignDefault,Nothing),(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Strong [Str "col1Header"]]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Strong [Str "col2Header"]]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Strong [Str "col3Header"]]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "col1",Space,Str "content"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Body",Space,Str "copy"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "col3",Space,Str "content"]]]]
+ []]
diff --git a/test/docx/table_one_row.native b/test/docx/table_one_row.native
index 1ea1b446c..36073641a 100644
--- a/test/docx/table_one_row.native
+++ b/test/docx/table_one_row.native
@@ -1,7 +1,17 @@
-[Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0]
- [[]
- ,[]
- ,[]]
- [[[Plain [Str "One"]]
- ,[Plain [Str "Row"]]
- ,[Plain [Str "Table"]]]]]
+[Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing),(AlignDefault,Nothing),(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "One"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Row"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Table"]]]]
+ []]
diff --git a/test/docx/table_variable_width.native b/test/docx/table_variable_width.native
index b85e58d41..0c6174937 100644
--- a/test/docx/table_variable_width.native
+++ b/test/docx/table_variable_width.native
@@ -1,16 +1,37 @@
-[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"]]
- ,[]
- ,[]]]]
+
+[Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing),(AlignDefault,Nothing),(AlignDefault,Nothing),(AlignDefault,Nothing),(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "h3"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "h4"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "h5"]]]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "c11"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "c22"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "c23"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []]]
+ []] \ No newline at end of file
diff --git a/test/docx/table_with_list_cell.native b/test/docx/table_with_list_cell.native
index 81bb15a1e..cc7b08a5e 100644
--- a/test/docx/table_with_list_cell.native
+++ b/test/docx/table_with_list_cell.native
@@ -1,11 +1,19 @@
-[Table [] [AlignDefault,AlignDefault] [0.0,0.0]
- [[Plain [Str "Cell",Space,Str "with",Space,Str "text"]]
- ,[Plain [Str "Cell",Space,Str "with",Space,Str "text"]]]
- [[[BulletList
+[Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing),(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Cell",Space,Str "with",Space,Str "text"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Cell",Space,Str "with",Space,Str "text"]]]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [BulletList
[[Para [Str "Cell",Space,Str "with"]]
,[Para [Str "A"]]
,[Para [Str "Bullet",Space,Str "list"]]]]
- ,[OrderedList (1,Decimal,Period)
+ ,Cell ("",[],[]) Nothing 1 1
+ [OrderedList (1,Decimal,Period)
[[Para [Str "Cell",Space,Str "with"]]
,[Para [Str "A"]]
- ,[Para [Str "Numbered",Space,Str "list."]]]]]]]
+ ,[Para [Str "Numbered",Space,Str "list."]]]]]]
+ []]
diff --git a/test/docx/tables.native b/test/docx/tables.native
index ae326950a..48de6f947 100644
--- a/test/docx/tables.native
+++ b/test/docx/tables.native
@@ -1,36 +1,80 @@
[Header 2 ("a-table-with-and-without-a-header-row",[],[]) [Str "A",Space,Str "table,",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "a",Space,Str "header",Space,Str "row"]
-,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0,0.0]
- [[Plain [Str "Name"]]
- ,[Plain [Str "Game"]]
- ,[Plain [Str "Fame"]]
- ,[Plain [Str "Blame"]]]
- [[[Plain [Str "Lebron",Space,Str "James"]]
- ,[Plain [Str "Basketball"]]
- ,[Plain [Str "Very",Space,Str "High"]]
- ,[Plain [Str "Leaving",Space,Str "Cleveland"]]]
- ,[[Plain [Str "Ryan",Space,Str "Braun"]]
- ,[Plain [Str "Baseball"]]
- ,[Plain [Str "Moderate"]]
- ,[Plain [Str "Steroids"]]]
- ,[[Plain [Str "Russell",Space,Str "Wilson"]]
- ,[Plain [Str "Football"]]
- ,[Plain [Str "High"]]
- ,[Plain [Str "Tacky",Space,Str "uniform"]]]]
-,Table [] [AlignDefault,AlignDefault] [0.0,0.0]
- [[]
- ,[]]
- [[[Plain [Str "Sinple"]]
- ,[Plain [Str "Table"]]]
- ,[[Plain [Str "Without"]]
- ,[Plain [Str "Header"]]]]
-,Table [] [AlignDefault,AlignDefault] [0.0,0.0]
- [[]
- ,[]]
- [[[Para [Str "Simple"]
+,Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing),(AlignDefault,Nothing),(AlignDefault,Nothing),(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Name"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Game"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Fame"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Blame"]]]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Lebron",Space,Str "James"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Basketball"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Very",Space,Str "High"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Leaving",Space,Str "Cleveland"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Ryan",Space,Str "Braun"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Baseball"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Moderate"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Steroids"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Russell",Space,Str "Wilson"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Football"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "High"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Tacky",Space,Str "uniform"]]]]
+ []
+,Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing),(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Sinple"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Table"]]]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Without"]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Plain [Str "Header"]]]]
+ []
+,Table ("",[],[]) (Caption Nothing
+ []) [(AlignDefault,Nothing),(AlignDefault,Nothing)] 0
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ []
+ ,Cell ("",[],[]) Nothing 1 1
+ []]]
+ [Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Para [Str "Simple"]
,Para [Str "Multiparagraph"]]
- ,[Para [Str "Table"]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Para [Str "Table"]
,Para [Str "Full"]]]
- ,[[Para [Str "Of"]
+ ,Row ("",[],[])
+ [Cell ("",[],[]) Nothing 1 1
+ [Para [Str "Of"]
,Para [Str "Paragraphs"]]
- ,[Para [Str "In",Space,Str "each"]
- ,Para [Str "Cell."]]]]]
+ ,Cell ("",[],[]) Nothing 1 1
+ [Para [Str "In",Space,Str "each"]
+ ,Para [Str "Cell."]]]]
+ []]