Skip to content

Commit

Permalink
Unit test demonstrating linkedin#12
Browse files Browse the repository at this point in the history
  • Loading branch information
pgalbraith committed Sep 16, 2018
1 parent d9ab689 commit 11eb5a7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,14 @@ public void testIpv6ZoneIndicesWithUrlEncodedDots(String address, String zoneInd
public void testBacktrackInvalidUsernamePassword() {
runTest("http://hello:asdf.com", UrlDetectorOptions.Default, "asdf.com");
}

/*
* https://github.com/linkedin/URL-Detector/issues/12
*/
@Test
public void testIssue12() {
runTest("http://user:[email protected] host.com", UrlDetectorOptions.Default, "http://user:[email protected]", "host.com");
}

private void runTest(String text, UrlDetectorOptions options, String... expected) {
//do the detection
Expand Down

0 comments on commit 11eb5a7

Please sign in to comment.