From 14af2a3858480bd2a4d0f02049e3a7debf5e60b6 Mon Sep 17 00:00:00 2001 From: EliotJones Date: Sat, 13 Sep 2025 16:48:39 +0200 Subject: [PATCH] fix test since document is now opened successfully but mediabox is broken --- src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs b/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs index 14cd5f5a..0fb47f01 100644 --- a/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs +++ b/src/UglyToad.PdfPig.Tests/Integration/GithubIssuesTests.cs @@ -102,8 +102,10 @@ { var path = IntegrationHelpers.GetSpecificTestDocumentPath("Hang.pdf"); - var ex = Assert.Throws(() => PdfDocument.Open(path, new ParsingOptions() { UseLenientParsing = true })); - Assert.StartsWith("Could not locate object with reference:", ex.Message); + using var doc = PdfDocument.Open(path, new ParsingOptions { UseLenientParsing = true }); + + var ex = Assert.Throws(() => doc.GetPage(1)); + Assert.StartsWith("Could not find", ex.Message); } [Fact]