]> git.sesse.net Git - ffmpeg/blob - tests/ref/fate/url
08e80def7dd3b18d0043d07567ba26fd2d36a176
[ffmpeg] / tests / ref / fate / url
1 Testing ff_url_decompose:
2
3 http://user:pass@ffmpeg:8080/dir/file?query#fragment =>
4   scheme: http:
5   authority: //
6   userinfo: user:pass@
7   host: ffmpeg
8   port: :8080
9   path: /dir/file
10   query: ?query
11   fragment: #fragment
12
13 http://ffmpeg/dir/file =>
14   scheme: http:
15   authority: //
16   host: ffmpeg
17   path: /dir/file
18
19 file:///dev/null =>
20   scheme: file:
21   authority: //
22   path: /dev/null
23
24 file:/dev/null =>
25   scheme: file:
26   path: /dev/null
27
28 http://[::1]/dev/null =>
29   scheme: http:
30   authority: //
31   host: [::1]
32   path: /dev/null
33
34 http://[::1]:8080/dev/null =>
35   scheme: http:
36   authority: //
37   host: [::1]
38   port: :8080
39   path: /dev/null
40
41 //ffmpeg/dev/null =>
42   authority: //
43   host: ffmpeg
44   path: /dev/null
45
46 test?url=http://server/path =>
47   path: test
48   query: ?url=http://server/path
49
50 dummy.mp4#t=0:02:00,121.5 =>
51   path: dummy.mp4
52   fragment: #t=0:02:00,121.5
53
54 Testing ff_make_absolute_url:
55                                             (null) baz                  => baz
56                                           /foo/bar baz                  => /foo/baz
57                                           /foo/bar ../baz               => /foo/../baz
58                                           /foo/bar /baz                 => /baz
59                                           /foo/bar ../../../baz         => /foo/../../../baz
60                                 http://server/foo/ baz                  => http://server/foo/baz
61                              http://server/foo/bar baz                  => http://server/foo/baz
62                                 http://server/foo/ ../baz               => http://server/baz
63                          http://server/foo/bar/123 ../../baz            => http://server/baz
64                          http://server/foo/bar/123 /baz                 => http://server/baz
65                          http://server/foo/bar/123 https://other/url    => https://other/url
66     http://server/foo/bar?param=value/with/slashes /baz                 => http://server/baz
67             http://server/foo/bar?param&otherparam ?someparam           => http://server/foo/bar?someparam
68                              http://server/foo/bar //other/url          => http://other/url
69                              http://server/foo/bar ../../../../../other/url => http://server/other/url
70                              http://server/foo/bar /../../../../../other/url => http://server/other/url
71                              http://server/foo/bar /test/../../../../../other/url => http://server/other/url
72                              http://server/foo/bar /test/../../test/../../../other/url => http://server/other/url
73                              http://server/foo/bar file:../baz/qux      => file:../baz/qux
74                            http://server/foo//bar/ ../../               => http://server/foo/
75                                    file:../tmp/foo ../bar/              => file:../tmp/../bar/
76                                    file:../tmp/foo file:../bar/         => file:../bar/
77                              http://server/foo/bar ./                   => http://server/foo/
78                              http://server/foo/bar .dotfile             => http://server/foo/.dotfile
79                              http://server/foo/bar ..doubledotfile      => http://server/foo/..doubledotfile
80                              http://server/foo/bar double..dotfile      => http://server/foo/double..dotfile
81                              http://server/foo/bar doubledotfile..      => http://server/foo/doubledotfile..
82                                 http://a/b/c/d;p?q g:h                  => g:h
83                                 http://a/b/c/d;p?q g                    => http://a/b/c/g
84                                 http://a/b/c/d;p?q ./g                  => http://a/b/c/g
85                                 http://a/b/c/d;p?q g/                   => http://a/b/c/g/
86                                 http://a/b/c/d;p?q /g                   => http://a/g
87                                 http://a/b/c/d;p?q //g                  => http://g
88                                 http://a/b/c/d;p?q ?y                   => http://a/b/c/d;p?y
89                                 http://a/b/c/d;p?q g?y                  => http://a/b/c/g?y
90                                 http://a/b/c/d;p?q #s                   => http://a/b/c/d;p?q#s
91                                 http://a/b/c/d;p?q g#s                  => http://a/b/c/g#s
92                                 http://a/b/c/d;p?q g?y#s                => http://a/b/c/g?y#s
93                                 http://a/b/c/d;p?q ;x                   => http://a/b/c/;x
94                                 http://a/b/c/d;p?q g;x                  => http://a/b/c/g;x
95                                 http://a/b/c/d;p?q g;x?y#s              => http://a/b/c/g;x?y#s
96                                 http://a/b/c/d;p?q                      => http://a/b/c/d;p?q
97                                 http://a/b/c/d;p?q .                    => http://a/b/c/
98                                 http://a/b/c/d;p?q ./                   => http://a/b/c/
99                                 http://a/b/c/d;p?q ..                   => http://a/b/
100                                 http://a/b/c/d;p?q ../                  => http://a/b/
101                                 http://a/b/c/d;p?q ../g                 => http://a/b/g
102                                 http://a/b/c/d;p?q ../..                => http://a/
103                                 http://a/b/c/d;p?q ../../               => http://a/
104                                 http://a/b/c/d;p?q ../../g              => http://a/g
105                                 http://a/b/c/d;p?q ../../../g           => http://a/g
106                                 http://a/b/c/d;p?q ../../../../g        => http://a/g
107                                 http://a/b/c/d;p?q /./g                 => http://a/g
108                                 http://a/b/c/d;p?q /../g                => http://a/g
109                                 http://a/b/c/d;p?q g.                   => http://a/b/c/g.
110                                 http://a/b/c/d;p?q .g                   => http://a/b/c/.g
111                                 http://a/b/c/d;p?q g..                  => http://a/b/c/g..
112                                 http://a/b/c/d;p?q ..g                  => http://a/b/c/..g
113                                 http://a/b/c/d;p?q ./../g               => http://a/b/g
114                                 http://a/b/c/d;p?q ./g/.                => http://a/b/c/g/
115                                 http://a/b/c/d;p?q g/./h                => http://a/b/c/g/h
116                                 http://a/b/c/d;p?q g/../h               => http://a/b/c/h
117                                 http://a/b/c/d;p?q g;x=1/./y            => http://a/b/c/g;x=1/y
118                                 http://a/b/c/d;p?q g;x=1/../y           => http://a/b/c/y
119                                 http://a/b/c/d;p?q g?y/./x              => http://a/b/c/g?y/./x
120                                 http://a/b/c/d;p?q g?y/../x             => http://a/b/c/g?y/../x
121                                 http://a/b/c/d;p?q g#s/./x              => http://a/b/c/g#s/./x
122                                 http://a/b/c/d;p?q g#s/../x             => http://a/b/c/g#s/../x
123
124 Testing av_url_split:
125 /foo/bar                                                     =>                                                    -1 /foo/bar
126 http://server/foo/                                           => http                            server             -1 /foo/
127 http://example.com/foo/bar                                   => http                            example.com        -1 /foo/bar
128 http://user:pass@localhost:8080/foo/bar/123                  => http            user:pass       localhost        8080 /foo/bar/123
129 http://server/foo/bar?param=value/with/slashes               => http                            server             -1 /foo/bar?param=value/with/slashes
130 https://1l-lh.a.net/i/1LIVE_HDS@179577/master.m3u8           => https                           1l-lh.a.net        -1 /i/1LIVE_HDS@179577/master.m3u8
131 ftp://u:p%2B%2F2@ftp.pbt.com/ExportHD.mpg                    => ftp             u:p%2B%2F2      ftp.pbt.com        -1 /ExportHD.mpg
132 https://key.dns.com?key_id=2&model_id=12345&&access_key=     => https                           key.dns.com        -1 ?key_id=2&model_id=12345&&access_key=
133 http://example.com#tag                                       => http                            example.com        -1 #tag