mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-15 03:34:52 +08:00
cover missing line in file trailer parsing
This commit is contained in:
@@ -118,6 +118,21 @@ startxref
|
||||
Assert.Throws<PdfDocumentFormatException>(action);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MissingNumericAfterStartXrefThrows()
|
||||
{
|
||||
var input = StringBytesTestConverter.Convert(@"11 0 obj
|
||||
<< /Type/Font >>
|
||||
endobj
|
||||
|
||||
startxref
|
||||
", false);
|
||||
|
||||
Action action = () => parser.GetFirstCrossReferenceOffset(input.Bytes, new CoreTokenScanner(input.Bytes), false);
|
||||
|
||||
Assert.Throws<PdfDocumentFormatException>(action);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TakesLastStartXrefPrecedingEndOfFile()
|
||||
{
|
||||
|
Reference in New Issue
Block a user