summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdftext_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdftext_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdftext_embeddertest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/fpdfsdk/fpdftext_embeddertest.cpp b/fpdfsdk/fpdftext_embeddertest.cpp
index 4b82dc081e..51216b9818 100644
--- a/fpdfsdk/fpdftext_embeddertest.cpp
+++ b/fpdfsdk/fpdftext_embeddertest.cpp
@@ -49,6 +49,12 @@ TEST_F(FPDFTextEmbeddertest, Text) {
EXPECT_EQ(1, FPDFText_GetText(textpage, 0, 0, fixed_buffer));
EXPECT_EQ(0, fixed_buffer[0]);
+ // Keep going and check the next case.
+ memset(fixed_buffer, 0xbd, sizeof(fixed_buffer));
+ EXPECT_EQ(2, FPDFText_GetText(textpage, 0, 1, fixed_buffer));
+ EXPECT_EQ(expected[0], fixed_buffer[0]);
+ EXPECT_EQ(0, fixed_buffer[1]);
+
// Check includes the terminating NUL that is provided.
int num_chars = FPDFText_GetText(textpage, 0, 128, fixed_buffer);
ASSERT_GE(num_chars, 0);