Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d3e96650
Commit
d3e96650
authored
Mar 21, 2012
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add test for _mbbtombc.
parent
7e34aec1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
string.c
dlls/msvcrt/tests/string.c
+31
-0
No files found.
dlls/msvcrt/tests/string.c
View file @
d3e96650
...
...
@@ -908,6 +908,36 @@ static void test_mbcjmsjis(void)
_setmbcp
(
prev_cp
);
}
static
void
test_mbbtombc
(
void
)
{
static
const
unsigned
int
mbbmbc
[][
2
]
=
{
{
0x1f
,
0x1f
},
{
0x20
,
0x8140
},
{
0x39
,
0x8258
},
{
0x40
,
0x8197
},
{
0x41
,
0x8260
},
{
0x5e
,
0x814f
},
{
0x7e
,
0x8150
},
{
0x7f
,
0x7f
},
{
0x80
,
0x80
},
{
0x81
,
0x81
},
{
0xa0
,
0xa0
},
{
0xa7
,
0x8340
},
{
0xb0
,
0x815b
},
{
0xd1
,
0x8380
},
{
0xff
,
0xff
},
{
0
,
0
}};
int
cp
[]
=
{
932
,
936
,
939
,
950
,
1361
,
_MB_CP_SBCS
};
int
i
,
j
;
int
prev_cp
=
_getmbcp
();
for
(
i
=
0
;
i
<
sizeof
(
cp
)
/
sizeof
(
cp
[
0
]);
i
++
)
{
_setmbcp
(
cp
[
i
]);
for
(
j
=
0
;
mbbmbc
[
j
][
0
]
!=
0
;
j
++
)
{
unsigned
int
exp
,
ret
;
ret
=
_mbbtombc
(
mbbmbc
[
j
][
0
]);
exp
=
(
cp
[
i
]
==
932
)
?
mbbmbc
[
j
][
1
]
:
mbbmbc
[
j
][
0
];
if
(
cp
[
i
]
==
932
&&
exp
>
255
)
todo_wine
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x (0x%x, codepage %d)
\n
"
,
exp
,
ret
,
mbbmbc
[
j
][
0
],
cp
[
i
]);
else
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x (0x%x, codepage %d)
\n
"
,
exp
,
ret
,
mbbmbc
[
j
][
0
],
cp
[
i
]);
}
}
_setmbcp
(
prev_cp
);
}
static
void
test_mbctombb
(
void
)
{
static
const
unsigned
int
mbcmbb_932
[][
2
]
=
{
...
...
@@ -2134,6 +2164,7 @@ START_TEST(string)
test__mbsnbcpy_s
();
test_mbcjisjms
();
test_mbcjmsjis
();
test_mbbtombc
();
test_mbctombb
();
test_ismbclegal
();
test_strtok
();
...
...
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