1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/test/urlparse.dat Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,103 @@ 1.4 +# Any blank lines and those beginning with # are comments and 1.5 +# ignored. To add additional test cases that could potentially 1.6 +# break URL parsing in mozilla add the input URL on a new line 1.7 +# and follow it with the expected output for the standard URL 1.8 +# parser and one line for the case when the URL is really 1.9 +# created. Then run urltest with the -std option and without it 1.10 +# on this file and hopefully the expected output should match 1.11 +# the one from the program. 1.12 +# - Gagan Saksena 03/28/00 1.13 +# 1.14 + 1.15 +http://username:password@hostname.com:80/pathname/./more/stuff/../path 1.16 +http,username,password,hostname.com,80,/pathname/more/,path,,,,,http://username:password@hostname.com:80/pathname/more/path 1.17 +http,username,password,hostname.com,80,/pathname/more/,path,,,,,http://username:password@hostname.com/pathname/more/path 1.18 + 1.19 +username@host:8080/path 1.20 +,username,,host,8080,/,path,,,,,username@host:8080/path 1.21 +Can not create URL 1.22 + 1.23 +http://gagan/ 1.24 +http,,,gagan,-1,/,,,,,,http://gagan/ 1.25 +http,,,gagan,-1,/,,,,,,http://gagan/ 1.26 + 1.27 +scheme:host/netlib 1.28 +scheme,,,host,-1,/,netlib,,,,,scheme://host/netlib 1.29 +Can not create URL 1.30 + 1.31 +mailbox:///foo 1.32 +mailbox,,,,-1,/,foo,,,,,mailbox:///foo 1.33 +mailbox,,,,-1,/,foo,,,,,mailbox:///foo 1.34 + 1.35 +scheme:user@hostname.edu:80/pathname 1.36 +scheme,user,,hostname.edu,80,/,pathname,,,,,scheme://user@hostname.edu:80/pathname 1.37 +Can not create URL 1.38 + 1.39 +http://username:password@hostname:80/pathname 1.40 +http,username,password,hostname,80,/,pathname,,,,,http://username:password@hostname:80/pathname 1.41 +http,username,password,hostname,80,/,pathname,,,,,http://username:password@hostname/pathname 1.42 + 1.43 +http://username:password@hostname:8080/path/filebasename.fileextension;param?query#ref 1.44 +http,username,password,hostname,8080,/path/,filebasename,fileextension,param,query,ref,http://username:password@hostname:8080/path/filebasename.fileextension;param?query#ref 1.45 +http,username,password,hostname,8080,/path/,filebasename,fileextension,param,query,ref,http://username:password@hostname:8080/path/filebasename.fileextension;param?query#ref 1.46 + 1.47 +resource:/pathname 1.48 +resource,,,,-1,/,pathname,,,,,resource:///pathname 1.49 +resource,,,,-1,/,pathname,,,,,resource:///pathname 1.50 + 1.51 +ftp://uname%here.com:pwd@there.com/aPath/a.html 1.52 +ftp,uname%here.com,pwd,there.com,-1,/aPath/,a,html,,,,ftp://uname%here.com:pwd@there.com/aPath/a.html 1.53 +ftp,uname%here.com,pwd,there.com,-1,/aPath/,a,html,,,,ftp://uname%here.com:pwd@there.com/aPath/a.html 1.54 + 1.55 +http://www.inf.bme.hu?foo=bar 1.56 +http,,,www.inf.bme.hu,-1,/,,,,foo=bar,,http://www.inf.bme.hu/?foo=bar 1.57 +http,,,www.inf.bme.hu,-1,/,,,,foo=bar,,http://www.inf.bme.hu/?foo=bar 1.58 + 1.59 +http://test.com/aPath/a.html#/1/2 1.60 +http,,,test.com,-1,/aPath/,a,html,,,/1/2,http://test.com/aPath/a.html#/1/2 1.61 +http,,,test.com,-1,/aPath/,a,html,,,/1/2,http://test.com/aPath/a.html#/1/2 1.62 + 1.63 +http://user:pass@ipaddres:2/get?foo/something 1.64 +http,user,pass,ipaddres,2,/,get,,,foo/something,,http://user:pass@ipaddres:2/get?foo/something 1.65 +http,user,pass,ipaddres,2,/,get,,,foo/something,,http://user:pass@ipaddres:2/get?foo/something 1.66 + 1.67 +# testing different versions of http urls 1.68 +http:www.mozilla.org 1.69 +http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/ 1.70 +http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/ 1.71 + 1.72 +http:/www.mozilla.org 1.73 +http,,,,-1,/,www.mozilla,org,,,,http:///www.mozilla.org 1.74 +http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/ 1.75 + 1.76 +# testing cap letters (23927) 1.77 +HtTp://wWw.mozilLa.org 1.78 +http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/ 1.79 +http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/ 1.80 + 1.81 +# testing spaces (15150) 1.82 +go.com.au?mozilla bug reports 1.83 +,,,go.com.au,-1,/,,,,mozilla%20bug%20reports,,go.com.au/?mozilla%20bug%20reports 1.84 +Can not create URL 1.85 + 1.86 +http://go.com.au?mozilla bug reports 1.87 +http,,,go.com.au,-1,/,,,,mozilla%20bug%20reports,,http://go.com.au/?mozilla%20bug%20reports 1.88 +http,,,go.com.au,-1,/,,,,mozilla%20bug%20reports,,http://go.com.au/?mozilla%20bug%20reports 1.89 + 1.90 +# testing for multiple params (14801) 1.91 +http://ad.doubleclick.net/ad/cbsmw.button.com/SIDEBAR_BUTTONS;sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414 1.92 +http,,,ad.doubleclick.net,-1,/ad/cbsmw.button.com/,SIDEBAR_BUTTONS,,sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414,,,http://ad.doubleclick.net/ad/cbsmw.button.com/SIDEBAR_BUTTONS;sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414 1.93 +http,,,ad.doubleclick.net,-1,/ad/cbsmw.button.com/,SIDEBAR_BUTTONS,,sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414,,,http://ad.doubleclick.net/ad/cbsmw.button.com/SIDEBAR_BUTTONS;sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414 1.94 + 1.95 +fxqn:/us/va/reston/cnri/ietf/24/asdf%*.fred 1.96 +fxqn,,,,-1,/us/va/reston/cnri/ietf/24/,asdf%*,fred,,,,fxqn:///us/va/reston/cnri/ietf/24/asdf%*.fred 1.97 +Can not create URL 1.98 + 1.99 +news:3B5C133C.2080505@foobar.net 1.100 +news,3B5C133C.2080505,,foobar.net,-1,/,,,,,,news://3B5C133C.2080505@foobar.net/ 1.101 +news,3B5C133C.2080505,,foobar.net,-1,/,,,,,,news://3B5C133C.2080505@foobar.net/ 1.102 + 1.103 +http://host/path/%2E%2E/file%2Ehtml 1.104 +http,,,host,-1,/,file%2Ehtml,,,,,http://host/file%2Ehtml 1.105 +http,,,host,-1,/,file%2Ehtml,,,,,http://host/file%2Ehtml 1.106 +