Parse page numbers from .docx files

This commit is contained in:
2021-09-06 09:47:57 -04:00
parent 22522d7d4a
commit 1dad8fae20
2 changed files with 46 additions and 4 deletions

View File

@@ -587,6 +587,7 @@ TEST(Ooxml, Docx1) {
ASSERT_STREQ(get_meta(&doc, MetaAuthor)->str_val, "Thomas");
ASSERT_STREQ(get_meta(&doc, MetaModifiedBy)->str_val, "Thomas");
ASSERT_EQ(get_meta(&doc, MetaPages)->long_val, 2);
ASSERT_NEAR(strlen(get_meta(&doc, MetaContent)->str_val), 500, 4);
cleanup(&doc, &f);
@@ -602,6 +603,7 @@ TEST(Ooxml, Docx2Thumbnail) {
parse_ooxml(&ooxml_500_ctx, &f, &doc);
ASSERT_NEAR(strlen(get_meta(&doc, MetaContent)->str_val), 500, 4);
ASSERT_EQ(get_meta(&doc, MetaPages)->long_val, 2);
ASSERT_NE(size_before, store_size);
cleanup(&doc, &f);