diff options
-rw-r--r-- | qpdf/qtest/qpdf/dangling-refs-dangling.out | 1 | ||||
-rw-r--r-- | qpdf/qtest/qpdf/minimal-dangling.out | 1 | ||||
-rw-r--r-- | qpdf/test_driver.cc | 6 |
3 files changed, 6 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf/dangling-refs-dangling.out b/qpdf/qtest/qpdf/dangling-refs-dangling.out index cf1522c4..a41cd59c 100644 --- a/qpdf/qtest/qpdf/dangling-refs-dangling.out +++ b/qpdf/qtest/qpdf/dangling-refs-dangling.out @@ -1,3 +1,4 @@ +new object: 11 0 R all objects 1 0 R 2 0 R diff --git a/qpdf/qtest/qpdf/minimal-dangling.out b/qpdf/qtest/qpdf/minimal-dangling.out index 6f656850..c3ad7c73 100644 --- a/qpdf/qtest/qpdf/minimal-dangling.out +++ b/qpdf/qtest/qpdf/minimal-dangling.out @@ -1,3 +1,4 @@ +new object: 7 0 R all objects 1 0 R 2 0 R diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc index ff211723..179dd6ac 100644 --- a/qpdf/test_driver.cc +++ b/qpdf/test_driver.cc @@ -2062,8 +2062,10 @@ test_53(QPDF& pdf, char const* arg2) { // Test get all objects and dangling ref handling QPDFObjectHandle root = pdf.getRoot(); - root.replaceKey( - "/Q1", pdf.makeIndirectObject(QPDFObjectHandle::newString("potato"))); + auto new_obj = + pdf.makeIndirectObject(QPDFObjectHandle::newString("potato")); + root.replaceKey("/Q1", new_obj); + std::cout << "new object: " << new_obj.unparse() << std::endl; std::cout << "all objects" << std::endl; for (auto& obj: pdf.getAllObjects()) { std::cout << obj.unparse() << std::endl; |