summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_doc_embeddertest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_doc_embeddertest.cpp b/fpdfsdk/fpdf_doc_embeddertest.cpp
index a9eb4b8cb7..5c0223ee46 100644
--- a/fpdfsdk/fpdf_doc_embeddertest.cpp
+++ b/fpdfsdk/fpdf_doc_embeddertest.cpp
@@ -358,6 +358,17 @@ TEST_F(FPDFDocEmbeddertest, GetMetaText) {
WideString::FromUTF16LE(buf, FXSYS_len(kExpectedModDate)));
}
+TEST_F(FPDFDocEmbeddertest, Bug_182) {
+ ASSERT_TRUE(OpenDocument("bug_182.pdf"));
+
+ unsigned short buf[128];
+ constexpr wchar_t kExpectedTitle[] = L"Super Visual Formade 印刷";
+
+ ASSERT_EQ(48u, FPDF_GetMetaText(document(), "Title", buf, sizeof(buf)));
+ EXPECT_EQ(WideString(kExpectedTitle),
+ WideString::FromUTF16LE(buf, FXSYS_len(kExpectedTitle)));
+}
+
TEST_F(FPDFDocEmbeddertest, GetMetaTextSameObjectNumber) {
ASSERT_TRUE(OpenDocument("annotation_highlight_square_with_ap.pdf"));