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
5df29720
Commit
5df29720
authored
Aug 15, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Aug 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Add more Unicode tests for 'reg import'.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
596ca595
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
reg.c
programs/reg/tests/reg.c
+63
-0
No files found.
programs/reg/tests/reg.c
View file @
5df29720
...
...
@@ -913,6 +913,45 @@ static void test_import(void)
todo_wine
ok
(
err
==
ERROR_SUCCESS
,
"got %d, expected 0
\n
"
,
err
);
/* Test file contents - Unicode */
test_import_wstr
(
"REGEDIT
\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
)
/* WinXP */
,
"got exit code %d, expected 1
\n
"
,
r
);
test_import_wstr
(
"REGEDIT4
\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
)
/* WinXP */
,
"got exit code %d, expected 1
\n
"
,
r
);
test_import_wstr
(
"
\xef\xbb\xbf
REGEDIT
\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
test_import_wstr
(
"
\xef\xbb\xbf
REGEDIT4
\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
test_import_wstr
(
"
\xef\xbb\xbf
REGEDIT4
\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
err
=
RegOpenKeyExA
(
HKEY_CURRENT_USER
,
KEY_BASE
,
0
,
KEY_READ
,
&
hkey
);
todo_wine
ok
(
err
==
ERROR_SUCCESS
,
"got %d, expected 0
\n
"
,
err
);
test_import_wstr
(
"
\xef\xbb\xbf
REGEDIT4
\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Unicode1
\"
=
\"
Value1
\"\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Unicode1"
,
REG_SZ
,
"Value1"
,
7
,
0
);
test_import_wstr
(
"
\xef\xbb\xbf
REGEDIT4
\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Unicode2
\"
=
\"
Value2
\"\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Unicode2"
,
REG_SZ
,
"Value2"
,
7
,
0
);
test_import_wstr
(
"
\xef\xbb\xbf
REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Unicode3
\"
=
\"
Value3
\"\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Unicode3"
,
REG_SZ
,
"Value3"
,
7
,
0
);
test_import_wstr
(
"Windows Registry Editor Version 4.00
\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
)
/* WinXP */
,
"got exit code %d, expected 1
\n
"
,
r
);
...
...
@@ -953,6 +992,30 @@ static void test_import(void)
test_import_wstr
(
"
\xef\xbb\xbf\n
Windows Registry Editor Version 5.00
\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
)
/* WinXP */
,
"got exit code %d, expected 1
\n
"
,
r
);
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Unicode4
\"
=
\"
Value4
\"\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Unicode4"
,
REG_SZ
,
"Value4"
,
7
,
0
);
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Unicode5
\"
=
\"
Value5
\"\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Unicode5"
,
REG_SZ
,
"Value5"
,
7
,
0
);
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Unicode6
\"
=
\"
Value6
\"\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Unicode6"
,
REG_SZ
,
"Value6"
,
7
,
0
);
err
=
RegCloseKey
(
hkey
);
todo_wine
ok
(
err
==
ERROR_SUCCESS
,
"got %d, expected 0
\n
"
,
err
);
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
todo_wine
ok
(
err
==
ERROR_SUCCESS
,
"got %d, expected 0
\n
"
,
err
);
}
START_TEST
(
reg
)
...
...
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