mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-07-18 05:27:11 +00:00
added a test case for catching HER-2013
This commit is contained in:
@@ -373,6 +373,16 @@ public class UURIFactoryTest extends TestCase {
|
||||
uuriTgt.toString().equals(uuri.toString()));
|
||||
}
|
||||
|
||||
public void testSchemelessRelative() throws URIException {
|
||||
UURI base = UURIFactory.getInstance("http://www.itsnicethat.com/articles/laura-hobson");
|
||||
UURI test1 = UURIFactory.getInstance(base, "//www.facebook.com/plugins/like.php");
|
||||
assertEquals("schemaless relative 1", "http://www.facebook.com/plugins/like.php", test1.toString());
|
||||
// reported by Erin Staniland
|
||||
UURI test2 = UURIFactory.getInstance(base, "//www.facebook.com/plugins/like.php?href=http://www.itsnicethat.com/articles/laura-hobson");
|
||||
assertEquals("schemeless relative 2", "http://www.facebook.com/plugins/like.php?href=http://www.itsnicethat.com/articles/laura-hobson",
|
||||
test2.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that an empty uuri does the right thing -- that we get back the
|
||||
* base.
|
||||
|
||||
Reference in New Issue
Block a user