Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
d10d2dc0
Commit
d10d2dc0
authored
May 10, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test cases for make_URI()
parent
cc112d8f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
src/test/url.c
src/test/url.c
+27
-0
No files found.
src/test/url.c
View file @
d10d2dc0
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <assert.h>
typedef
char
*
(
*
conv_t
)
(
const
char
*
);
typedef
char
*
(
*
conv_t
)
(
const
char
*
);
...
@@ -60,8 +61,15 @@ static inline void test_b64 (const char *in, const char *out)
...
@@ -60,8 +61,15 @@ static inline void test_b64 (const char *in, const char *out)
test
(
vlc_b64_encode
,
in
,
out
);
test
(
vlc_b64_encode
,
in
,
out
);
}
}
static
inline
void
test_path
(
const
char
*
in
,
const
char
*
out
)
{
test
(
make_URI
,
in
,
out
);
}
int
main
(
void
)
int
main
(
void
)
{
{
int
val
;
(
void
)
setvbuf
(
stdout
,
NULL
,
_IONBF
,
0
);
(
void
)
setvbuf
(
stdout
,
NULL
,
_IONBF
,
0
);
test_decode
(
"this_should_not_be_modified_1234"
,
test_decode
(
"this_should_not_be_modified_1234"
,
"this_should_not_be_modified_1234"
);
"this_should_not_be_modified_1234"
);
...
@@ -93,5 +101,24 @@ int main (void)
...
@@ -93,5 +101,24 @@ int main (void)
test_b64
(
"fooba"
,
"Zm9vYmE="
);
test_b64
(
"fooba"
,
"Zm9vYmE="
);
test_b64
(
"foobar"
,
"Zm9vYmFy"
);
test_b64
(
"foobar"
,
"Zm9vYmFy"
);
/* Path test */
test_path
(
"file:///"
,
"file:///"
);
test_path
(
"http://www.example.com/%7Ejohn/"
,
"http://www.example.com/%7Ejohn/"
);
test_path
(
"/"
,
"file:///"
);
test_path
(
"/home/john/"
,
"file:///home/john/"
);
test_path
(
"/home/john/music.ogg"
,
"file:///home/john/music.ogg"
);
//test_path ("\\\\server/pub/music.ogg", "file://server/pub/music.ogg");
/*int fd = open (".", O_RDONLY);
assert (fd != -1);*/
val
=
chdir
(
"/tmp"
);
assert
(
val
!=
-
1
);
test_path
(
"movie.ogg"
,
"file:///tmp/movie.ogg"
);
test_path
(
"."
,
"file:///tmp/."
);
test_path
(
""
,
"file:///tmp/"
);
/*val = fchdir (fd);
assert (val != -1);*/
return
0
;
return
0
;
}
}
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