Skip to content

Commit

Permalink
Updated parser tests to account for protocol parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrasser committed Apr 18, 2016
1 parent ff06755 commit b9a1281
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/spec/linkify/core/parser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ var tests = [
['This [', 'i.imgur.com/ckSj2Ba.jpg', ')] should also work']
], [
'A link is http://nick.is.awesome/?q=nick+amazing&nick=yo%29%30hellp another is http://nick.con/?q=look',
[TEXT, URL, TEXT],
['A link is ', 'http://nick.is', '.awesome/?q=nick+amazing&nick=yo%29%30hellp another is http://nick.con/?q=look']
[TEXT, URL, TEXT, URL],
['A link is ', 'http://nick.is.awesome/?q=nick+amazing&nick=yo%29%30hellp', ' another is ', 'http://nick.con/?q=look']
], [
'SOme URLS http://google.com https://google1.com google2.com google.com/search?q=potatoes+oven goo.gl/0192n1 google.com?q=asda test bit.ly/0912j www.bob.com indigo.dev.soapbox.co/mobile google.com/?q=.exe flickr.com/linktoimage.jpg',
[TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL, TEXT, URL],
Expand Down Expand Up @@ -130,6 +130,10 @@ var tests = [
'A really funky one (example.com/?id=asd2{hellow}and%20it%20continues(23&((@)) and it ends',
[TEXT, URL, TEXT],
['A really funky one (', 'example.com/?id=asd2{hellow}and%20it%20continues(23&((@)', ') and it ends']
], [
'Force http:/ and http:// are not but http://a and http://b.local?qeasd3qas=23 are all links',
[TEXT, URL, TEXT, URL, TEXT],
['Force http:/ and http:// are not but ', 'http://a', ' and ', 'http://b.local?qeasd3qas=23', ' are all links']
]
];

Expand Down

0 comments on commit b9a1281

Please # to comment.