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
8d0b3b08
Commit
8d0b3b08
authored
Jun 06, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add tests for high Unicode planes.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d2c22552
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
reg.c
dlls/ntdll/tests/reg.c
+22
-1
rtlstr.c
dlls/ntdll/tests/rtlstr.c
+20
-1
No files found.
dlls/ntdll/tests/reg.c
View file @
8d0b3b08
...
...
@@ -342,7 +342,7 @@ static void test_RtlQueryRegistryValues(void)
static
void
test_NtOpenKey
(
void
)
{
HANDLE
key
;
HANDLE
key
,
subkey
;
NTSTATUS
status
;
OBJECT_ATTRIBUTES
attr
;
ACCESS_MASK
am
=
KEY_READ
;
...
...
@@ -456,6 +456,27 @@ static void test_NtOpenKey(void)
ok
(
status
==
STATUS_OBJECT_TYPE_MISMATCH
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
pRtlFreeUnicodeString
(
&
str
);
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
status
=
pNtOpenKey
(
&
key
,
KEY_WRITE
|
KEY_READ
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08lx
\n
"
,
status
);
/* keys are case insensitive even without OBJ_CASE_INSENSITIVE */
InitializeObjectAttributes
(
&
attr
,
&
str
,
0
,
key
,
0
);
pRtlInitUnicodeString
(
&
str
,
L"
\xf6\xf3\x14d\x371\xd801\xdc00
"
);
status
=
pNtCreateKey
(
&
subkey
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08lx
\n
"
,
status
);
pNtClose
(
subkey
);
pRtlInitUnicodeString
(
&
str
,
L"
\xd6\xd3\x14c\x370\xd801\xdc28
"
);
/* surrogates not supported */
status
=
pNtOpenKeyEx
(
&
subkey
,
KEY_ALL_ACCESS
,
&
attr
,
0
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKeyEx failed: 0x%08lx
\n
"
,
status
);
pRtlInitUnicodeString
(
&
str
,
L"
\xd6\xd3\x14c\x370\xd801\xdc00
"
);
status
=
pNtOpenKeyEx
(
&
subkey
,
KEY_ALL_ACCESS
,
&
attr
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKeyEx failed: 0x%08lx
\n
"
,
status
);
pNtDeleteKey
(
subkey
);
pNtClose
(
subkey
);
pNtClose
(
key
);
if
(
!
pNtOpenKeyEx
)
{
win_skip
(
"NtOpenKeyEx not available
\n
"
);
...
...
dlls/ntdll/tests/rtlstr.c
View file @
8d0b3b08
...
...
@@ -608,7 +608,7 @@ static void test_RtlUpcaseUnicodeChar(void)
static
void
test_RtlUpcaseUnicodeString
(
void
)
{
int
i
;
int
i
,
j
;
WCHAR
ch
;
WCHAR
upper_ch
;
WCHAR
ascii_buf
[
257
];
...
...
@@ -654,6 +654,25 @@ static void test_RtlUpcaseUnicodeString(void)
result_str
.
Buffer
[
i
],
result_str
.
Buffer
[
i
],
upper_str
.
Buffer
[
i
],
upper_str
.
Buffer
[
i
]);
}
/* test surrogates */
for
(
i
=
0x100
;
i
<
0x1100
;
i
++
)
{
WCHAR
src
[
512
],
dst
[
512
];
for
(
j
=
0
;
j
<
256
;
j
++
)
{
unsigned
int
ch
=
((
i
<<
8
)
+
j
)
-
0x10000
;
src
[
2
*
j
]
=
0xd800
|
(
ch
>>
10
);
src
[
2
*
j
+
1
]
=
0xdc00
|
(
ch
&
0x3ff
);
}
upper_str
.
Length
=
upper_str
.
MaximumLength
=
512
*
sizeof
(
WCHAR
);
upper_str
.
Buffer
=
src
;
result_str
.
Length
=
result_str
.
MaximumLength
=
512
*
sizeof
(
WCHAR
);
result_str
.
Buffer
=
dst
;
pRtlUpcaseUnicodeString
(
&
result_str
,
&
upper_str
,
0
);
ok
(
!
memcmp
(
src
,
dst
,
sizeof
(
dst
)),
"string compare mismatch in %04x-%04x
\n
"
,
i
<<
8
,
(
i
<<
8
)
+
255
);
}
}
...
...
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