mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-21 04:17:57 +08:00
#6 improve organisation of cff related classes. add failing font test for cff font file. fix bugs with cff parsing
This commit is contained in:
@@ -8,10 +8,15 @@
|
||||
|
||||
public class IntegrationDocumentTests
|
||||
{
|
||||
private static readonly Lazy<string> DocumentFolder = new Lazy<string>(() => Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "Integration", "Documents")));
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(GetAllDocuments))]
|
||||
public void CanReadAllPages(string documentName)
|
||||
{
|
||||
// Add the full path back on, we removed it so we could see it in the test explorer.
|
||||
documentName = Path.Combine(DocumentFolder.Value, documentName);
|
||||
|
||||
using (var document = PdfDocument.Open(documentName, new ParsingOptions{ UseLenientParsing = false}))
|
||||
{
|
||||
for (var i = 0; i < document.NumberOfPages; i++)
|
||||
@@ -25,11 +30,10 @@
|
||||
{
|
||||
get
|
||||
{
|
||||
var documentFolder = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "Integration", "Documents"));
|
||||
var files = Directory.GetFiles(DocumentFolder.Value, "*.pdf");
|
||||
|
||||
var files = Directory.GetFiles(documentFolder, "*.pdf");
|
||||
|
||||
return files.Select(x => new object[] {x});
|
||||
// Return the shortname so we can see it in the test explorer.
|
||||
return files.Select(x => new object[] {Path.GetFileName(x)});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,6 @@
|
||||
{
|
||||
var page = document.GetPage(9);
|
||||
|
||||
// TODO: This page requires a CFF font parser for Type 1 fonts, see 5.5.1
|
||||
Assert.Contains("BreedsNative breeds of pig can be found throughout the country. They are a small body size compared to other exotic and crosses pig types. There name varies from region to region, for example", page.Text);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user