diff options
author | Jay Berkenbilt <ejb@ql.org> | 2023-10-14 23:31:46 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2023-10-14 23:31:54 +0200 |
commit | 9fc02e2f91c856c8b8cd7369ceecd5a89deedb37 (patch) | |
tree | 522b908202b5c3f46fad76d39cf91a16a63874b3 | |
parent | 1ecc6bb29e24a4f89470ff91b2682b46e0576ad4 (diff) | |
download | qpdf-9fc02e2f91c856c8b8cd7369ceecd5a89deedb37.tar.zst |
Add another string parsing test
-rw-r--r-- | qpdf/test_driver.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc index 798bd623..03631eb2 100644 --- a/qpdf/test_driver.cc +++ b/qpdf/test_driver.cc @@ -3344,12 +3344,16 @@ test_95(QPDF& pdf, char const* arg2) static void test_96(QPDF& pdf, char const* arg2) { - // Test edge cases with quoted characters + // Test edge cases with quoted characters and string parsing. auto s = R"((\48\418\121\4))"_qpdf; assert(s.unparseBinary() == "<043821385104>"); s = R"((\48\418\121\41))"_qpdf; assert(s.unparseBinary() == "<043821385121>"); + s = R"(<a>)"_qpdf; + assert(s.unparseBinary() == "<a0>"); + s = R"(<abc>)"_qpdf; + assert(s.unparseBinary() == "<abc0>"); } void |