Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
84b05383
Commit
84b05383
authored
Feb 18, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add more normalization tests.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c388ad35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
locale.c
dlls/kernel32/tests/locale.c
+31
-1
No files found.
dlls/kernel32/tests/locale.c
View file @
84b05383
...
...
@@ -6104,6 +6104,14 @@ static void test_NormalizeString(void)
ok
(
str_cmp
==
0
,
"%s:%d: string incorrect got %s expect %s
\n
"
,
wine_dbgstr_w
(
ptest
->
str
),
i
,
wine_dbgstr_w
(
dst
),
wine_dbgstr_w
(
ptest
->
expected
[
i
])
);
ret
=
FALSE
;
status
=
pRtlIsNormalizedString
(
norm_forms
[
i
],
ptest
->
str
,
-
1
,
&
ret
);
todo_wine
ok
(
!
status
,
"%s:%d: failed %x
\n
"
,
wine_dbgstr_w
(
ptest
->
str
),
i
,
status
);
if
(
!
wcscmp
(
ptest
->
str
,
dst
))
todo_wine
ok
(
ret
,
"%s:%d: not normalized
\n
"
,
wine_dbgstr_w
(
ptest
->
str
),
i
);
else
ok
(
!
ret
,
"%s:%d: normalized (dst %s)
\n
"
,
wine_dbgstr_w
(
ptest
->
str
),
i
,
wine_dbgstr_w
(
dst
)
);
ret
=
FALSE
;
status
=
pRtlIsNormalizedString
(
norm_forms
[
i
],
dst
,
dstlen
,
&
ret
);
todo_wine
ok
(
!
status
,
"%s:%d: failed %x
\n
"
,
wine_dbgstr_w
(
ptest
->
str
),
i
,
status
);
todo_wine
ok
(
ret
,
"%s:%d: not normalized
\n
"
,
wine_dbgstr_w
(
ptest
->
str
),
i
);
...
...
@@ -6301,7 +6309,7 @@ static void test_NormalizeString(void)
{
char
*
p
,
buffer
[
1024
];
WCHAR
str
[
3
],
srcW
[
32
],
dstW
[
32
],
resW
[
4
][
32
];
int
i
,
line
=
0
,
part
=
0
,
ch
;
int
line
=
0
,
part
=
0
,
ch
;
char
tested
[
0x110000
/
8
];
while
(
fgets
(
buffer
,
sizeof
(
buffer
),
f
))
...
...
@@ -6334,6 +6342,28 @@ static void test_NormalizeString(void)
ok
(
!
wcscmp
(
dstW
,
resW
[
i
]
),
"line %u form %u: wrong result %s for %s expected %s
\n
"
,
line
,
i
,
wine_dbgstr_w
(
dstW
),
wine_dbgstr_w
(
srcW
),
wine_dbgstr_w
(
resW
[
i
]
));
ret
=
FALSE
;
status
=
pRtlIsNormalizedString
(
norm_forms
[
i
],
srcW
,
-
1
,
&
ret
);
ok
(
!
status
,
"line %u form %u: RtlIsNormalizedString failed %x
\n
"
,
line
,
i
,
status
);
if
(
!
wcscmp
(
srcW
,
dstW
))
ok
(
ret
,
"line %u form %u: source not normalized %s
\n
"
,
line
,
i
,
wine_dbgstr_w
(
srcW
)
);
else
ok
(
!
ret
,
"line %u form %u: source normalized %s
\n
"
,
line
,
i
,
wine_dbgstr_w
(
srcW
)
);
ret
=
FALSE
;
status
=
pRtlIsNormalizedString
(
norm_forms
[
i
],
dstW
,
-
1
,
&
ret
);
ok
(
!
status
,
"line %u form %u: RtlIsNormalizedString failed %x
\n
"
,
line
,
i
,
status
);
ok
(
ret
,
"line %u form %u: dest not normalized %s
\n
"
,
line
,
i
,
wine_dbgstr_w
(
dstW
)
);
for
(
j
=
0
;
j
<
4
;
j
++
)
{
int
expect
=
i
|
(
j
&
2
);
memset
(
dstW
,
0xcc
,
sizeof
(
dstW
)
);
dstlen
=
pNormalizeString
(
norm_forms
[
i
],
resW
[
j
],
-
1
,
dstW
,
ARRAY_SIZE
(
dstW
)
);
ok
(
!
wcscmp
(
dstW
,
resW
[
expect
]
),
"line %u form %u res %u: wrong result %s for %s expected %s
\n
"
,
line
,
i
,
j
,
wine_dbgstr_w
(
dstW
),
wine_dbgstr_w
(
resW
[
j
]
),
wine_dbgstr_w
(
resW
[
expect
]
));
}
}
}
fclose
(
f
);
...
...
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