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
f8343052
Commit
f8343052
authored
Aug 30, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port new URL tests to test/
Support Python 2.4
parent
f7f09d38
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
13 deletions
+29
-13
test/NativeURLTest.py
test/NativeURLTest.py
+2
-2
test/native/init.c
test/native/init.c
+1
-1
test/native/tests.h
test/native/tests.h
+1
-1
test/native/url.c
test/native/url.c
+23
-7
test/test.sh
test/test.sh
+2
-2
No files found.
test/NativeURLTest.py
View file @
f8343052
...
...
@@ -4,5 +4,5 @@ import native_libvlc_test
class
NativeURLTestCase
(
unittest
.
TestCase
):
def
testurl_decode
(
self
):
"""[URL] Test url_decode"""
native_libvlc_test
.
url_
decode_
test
()
"""[URL] Test url_decode
and base64
"""
native_libvlc_test
.
url_test
()
test/native/init.c
View file @
f8343052
...
...
@@ -16,7 +16,7 @@ static PyMethodDef native_libvlc_test_methods[] = {
DEF_METHOD
(
vlm_test
,
"Test VLM"
)
DEF_METHOD
(
timers_test
,
"Test timers"
)
DEF_METHOD
(
i18n_atof_test
,
"Test i18n_atof"
)
DEF_METHOD
(
url_
decode_
test
,
"URL decoding"
)
DEF_METHOD
(
url_test
,
"URL decoding"
)
DEF_METHOD
(
chains_test
,
"Test building of chains"
)
DEF_METHOD
(
gui_chains_test
,
"Test interactions between chains and GUI"
)
DEF_METHOD
(
psz_chains_test
,
"Test building of chain strings"
)
...
...
test/native/tests.h
View file @
f8343052
...
...
@@ -9,7 +9,7 @@ PyObject *vlm_test( PyObject *self, PyObject *args );
/* Stats */
PyObject
*
timers_test
(
PyObject
*
self
,
PyObject
*
args
);
PyObject
*
url_
decode_
test
(
PyObject
*
self
,
PyObject
*
args
);
PyObject
*
url_test
(
PyObject
*
self
,
PyObject
*
args
);
PyObject
*
i18n_atof_test
(
PyObject
*
self
,
PyObject
*
args
);
...
...
test/native/url.c
View file @
f8343052
...
...
@@ -23,23 +23,32 @@
#include <vlc/vlc.h>
#include "vlc_url.h"
PyObject
*
test_decode
(
const
char
*
in
,
const
char
*
out
)
typedef
char
*
(
*
conv_t
)
(
const
char
*
);
PyObject
*
test
(
conv_t
f
,
const
char
*
in
,
const
char
*
out
)
{
char
*
res
;
printf
(
"
\"
%s
\"
->
\"
%s
\"
?
\n
"
,
in
,
out
);
res
=
decode_URI_duplicate
(
in
);
ASSERT
(
res
!=
NULL
,
""
);
if
(
res
==
NULL
)
exit
(
1
);
res
=
f
(
in
);
ASSERT
(
res
!=
NULL
,
"NULL result"
);
ASSERT
(
strcmp
(
res
,
out
)
==
NULL
,
""
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
PyObject
*
url_decode_test
(
PyObject
*
self
,
PyObject
*
args
)
static
inline
PyObject
*
test_decode
(
const
char
*
in
,
const
char
*
out
)
{
return
test
(
decode_URI_duplicate
,
in
,
out
);
}
static
inline
PyObject
*
test_b64
(
const
char
*
in
,
const
char
*
out
)
{
return
test
(
vlc_b64_encode
,
in
,
out
);
}
PyObject
*
url_test
(
PyObject
*
self
,
PyObject
*
args
)
{
printf
(
"
\n
"
);
if
(
!
test_decode
(
"this_should_not_be_modified_1234"
,
...
...
@@ -65,6 +74,13 @@ PyObject *url_decode_test( PyObject *self, PyObject *args )
if
(
!
test_decode
(
"%C1%94%C3%a9l%c3%A9vision"
,
"??élévision"
)
)
return
NULL
;
/* overlong */
/* Base 64 tests */
test_b64
(
""
,
""
);
test_b64
(
"d"
,
"ZA=="
);
test_b64
(
"ab"
,
"YQG="
);
test_b64
(
"abc"
,
"YQGI"
);
test_b64
(
"abcd"
,
"YQGIZA=="
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
test/test.sh
View file @
f8343052
...
...
@@ -5,7 +5,7 @@ python setup.py build
cd
..
# TODO: FIXME !!
export
PYTHONPATH
=
$PYTHONPATH
:bindings/mediacontrol-python/build/lib.linux-i686-2.3:test/build/lib.linux-i686-2.3:test/build/lib.linux-x86_64-2.3
export
PYTHONPATH
=
$PYTHONPATH
:bindings/mediacontrol-python/build/lib.linux-i686-2.3:test/build/lib.linux-i686-2.3:test/build/lib.linux-x86_64-2.3
:test/build/lib.linux-i686-2.4:test/build/lib.linux-x86_64-2.4
export
LD_LIBRARY_PATH
=
src/.libs/
...
...
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