mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
avformat/tests/url: make format more readable
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
e2307f4ff1
commit
0f5127b1ca
@ -24,7 +24,7 @@ static void test(const char *base, const char *rel)
|
||||
{
|
||||
char buf[200], buf2[200];
|
||||
ff_make_absolute_url(buf, sizeof(buf), base, rel);
|
||||
printf("%s\n", buf);
|
||||
printf("%50s %-20s => %s\n", base, rel, buf);
|
||||
if (base) {
|
||||
/* Test in-buffer replacement */
|
||||
snprintf(buf2, sizeof(buf2), "%s", base);
|
||||
@ -38,6 +38,7 @@ static void test(const char *base, const char *rel)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Testing ff_make_absolute_url:\n");
|
||||
test(NULL, "baz");
|
||||
test("/foo/bar", "baz");
|
||||
test("/foo/bar", "../baz");
|
||||
|
@ -1,13 +1,14 @@
|
||||
baz
|
||||
/foo/baz
|
||||
/baz
|
||||
/baz
|
||||
http://server/foo/baz
|
||||
http://server/foo/baz
|
||||
http://server/baz
|
||||
http://server/baz
|
||||
http://server/baz
|
||||
https://other/url
|
||||
http://server/baz
|
||||
http://server/foo/bar?someparam
|
||||
http://other/url
|
||||
Testing ff_make_absolute_url:
|
||||
(null) baz => baz
|
||||
/foo/bar baz => /foo/baz
|
||||
/foo/bar ../baz => /baz
|
||||
/foo/bar /baz => /baz
|
||||
http://server/foo/ baz => http://server/foo/baz
|
||||
http://server/foo/bar baz => http://server/foo/baz
|
||||
http://server/foo/ ../baz => http://server/baz
|
||||
http://server/foo/bar/123 ../../baz => http://server/baz
|
||||
http://server/foo/bar/123 /baz => http://server/baz
|
||||
http://server/foo/bar/123 https://other/url => https://other/url
|
||||
http://server/foo/bar?param=value/with/slashes /baz => http://server/baz
|
||||
http://server/foo/bar?param&otherparam ?someparam => http://server/foo/bar?someparam
|
||||
http://server/foo/bar //other/url => http://other/url
|
||||
|
Loading…
Reference in New Issue
Block a user