1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-10 02:00:24 +08:00

初步完成table

This commit is contained in:
源文雨
2023-02-23 22:41:29 +08:00
parent 2b7e65a399
commit be9f9e9672
12 changed files with 604 additions and 144 deletions

View File

@@ -26,10 +26,11 @@ func TestUnmarshalPlainStructure(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if len(doc.Body.Paragraphs) != tc.numParagraphs {
t.Fatalf("We expected %d paragraphs, we got %d", tc.numParagraphs, len(doc.Body.Paragraphs))
if len(doc.Body.Items) != tc.numParagraphs {
t.Fatalf("We expected %d paragraphs, we got %d", tc.numParagraphs, len(doc.Body.Items))
}
for i, p := range doc.Body.Paragraphs {
for i, it := range doc.Body.Items {
p := it.(Paragraph)
if len(p.Children) == 0 {
t.Fatalf("We were not able to parse paragraph %d", i)
}