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
89d3524d
Commit
89d3524d
authored
Jul 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test cases for convert_xml_special_chars
parent
69d28e6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/test/xmlent.c
src/test/xmlent.c
+18
-0
No files found.
src/test/xmlent.c
View file @
89d3524d
...
...
@@ -44,6 +44,21 @@ static void decode (const char *in, const char *out)
}
}
static
void
encode
(
const
char
*
in
,
const
char
*
out
)
{
char
*
buf
;
printf
(
"
\"
%s
\"
->
\"
%s
\"
?
\n
"
,
in
,
out
);
buf
=
convert_xml_special_chars
(
in
);
if
(
strcmp
(
buf
,
out
))
{
printf
(
" ERROR: got
\"
%s
\"\n
"
,
buf
);
exit
(
2
);
}
free
(
buf
);
}
int
main
(
void
)
{
(
void
)
setvbuf
(
stdout
,
NULL
,
_IONBF
,
0
);
...
...
@@ -59,5 +74,8 @@ int main (void)
decode
(
"&<
\"
'"
,
"&<
\"
'"
);
decode
(
"&oelig"
,
"&oelig"
);
encode
(
""
,
""
);
encode
(
"a'àc
\"
çe&én<ño>ö1:"
,
"a'àc"çe&én<ño>ö1:"
);
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