Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
0f5127b1
Commit
0f5127b1
authored
Feb 02, 2020
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/tests/url: make format more readable
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
e2307f4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
url.c
libavformat/tests/url.c
+2
-1
url
tests/ref/fate/url
+14
-13
No files found.
libavformat/tests/url.c
View file @
0f5127b1
...
...
@@ -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"
);
...
...
tests/ref/fate/url
View file @
0f5127b1
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment