mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-23 22:26:01 +00:00
bugfix, new test case.
This commit is contained in:
@@ -102,7 +102,7 @@ public class ExtractorPDFContent extends ContentExtractor {
|
||||
|
||||
//handle URLs wrapped in parentheses
|
||||
if(prospectiveURL.startsWith("(")) {
|
||||
prospectiveURL=prospectiveURL.substring(1,prospectiveURL.length()-1);
|
||||
prospectiveURL=prospectiveURL.substring(1,prospectiveURL.length());
|
||||
if(prospectiveURL.endsWith(")"))
|
||||
prospectiveURL=prospectiveURL.substring(0,prospectiveURL.length()-1);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ExtractorPDFContentTest extends ContentExtractorTestBase {
|
||||
CrawlURI testUri = createTestUri("http://www.example.com/fake.pdf", TEST_RESOURCE_FILE_4);
|
||||
extractor.process(testUri);
|
||||
|
||||
Set<Link> expected = makeLinkSet(testUri, new String[]{"http://www.unisys.com","http://www.myserver.mycorp.com/images/exttest.jpg","http://www.adobe.com/intro?100,200","http://www.w3.org/1999/xhtml","http://www.xfa.org/schema/xfa-data/1.0","http://www.adobe.com","http://www.adobe.com/getacro.gif"});
|
||||
Set<Link> expected = makeLinkSet(testUri, new String[]{"http://www.unisys.com","http://www.myserver.mycorp.com/images/exttest.jpg","http://www.adobe.com/intro?100,200","http://www.w3.org/1999/xhtml","http://www.xfa.org/schema/xfa-data/1.0","http://www.adobe.com","http://www.adobe.com/getacro.gif","http://www.example.com/testOpeningParen"});
|
||||
assertTrue(testUri.getOutLinks().containsAll(expected));
|
||||
}
|
||||
public void testNewlineSeparatedURIs() throws URIException, UnsupportedEncodingException, IOException, InterruptedException{
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user