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
c5f0de77
Commit
c5f0de77
authored
May 17, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
May 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Add tests for key name and value name concatenation.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
febdb101
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
reg.c
programs/reg/tests/reg.c
+56
-0
No files found.
programs/reg/tests/reg.c
View file @
c5f0de77
...
...
@@ -1381,6 +1381,34 @@ static void test_import(void)
dword
=
0x00000008
;
todo_wine
verify_reg
(
hkey
,
"single'quote"
,
REG_DWORD
,
&
dword
,
sizeof
(
dword
),
0
);
/* Test key name and value name concatenation */
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\\n
"
"Subkey1]
\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
err
=
RegOpenKeyExA
(
hkey
,
"Subkey1"
,
0
,
KEY_READ
,
&
subkey
);
todo_wine
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"got %d, expected 2
\n
"
,
err
);
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\n
"
"
\\
Subkey2]
\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
err
=
RegOpenKeyExA
(
hkey
,
"Subkey2"
,
0
,
KEY_READ
,
&
subkey
);
todo_wine
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"got %d, expected 2
\n
"
,
err
);
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine
\\\n
"
"42a
\"
=
\"
Value 1
\"\n
"
"
\"
Wine42b
\"
=
\"
Value 2
\"\n
"
"
\"
Wine
\n
"
"
\\
42c
\"
=
\"
Value 3
\"\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42a"
);
todo_wine
verify_reg
(
hkey
,
"Wine42b"
,
REG_SZ
,
"Value 2"
,
8
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42c"
);
/* Test import with subkeys */
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
Subkey
\"
1]
\n
"
"
\"
Wine
\\\\
31
\"
=
\"
Test value
\"\n\n
"
,
&
r
);
...
...
@@ -1980,6 +2008,34 @@ static void test_import(void)
dword
=
0x00000008
;
todo_wine
verify_reg
(
hkey
,
"single'quote"
,
REG_DWORD
,
&
dword
,
sizeof
(
dword
),
0
);
/* Test key name and value name concatenation */
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\\n
"
"Subkey1]
\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
err
=
RegOpenKeyExA
(
hkey
,
"Subkey1"
,
0
,
KEY_READ
,
&
subkey
);
todo_wine
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"got %d, expected 2
\n
"
,
err
);
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\n
"
"
\\
Subkey2]
\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
err
=
RegOpenKeyExA
(
hkey
,
"Subkey2"
,
0
,
KEY_READ
,
&
subkey
);
todo_wine
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"got %d, expected 2
\n
"
,
err
);
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine
\\\n
"
"42a
\"
=
\"
Value 1
\"\n
"
"
\"
Wine42b
\"
=
\"
Value 2
\"\n
"
"
\"
Wine
\n
"
"
\\
42c
\"
=
\"
Value 3
\"\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42a"
);
todo_wine
verify_reg
(
hkey
,
"Wine42b"
,
REG_SZ
,
"Value 2"
,
8
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42c"
);
/* Test import with subkeys */
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
Subkey
\"
1]
\n
"
"
\"
Wine
\\\\
31
\"
=
\"
Test value
\"\n\n
"
,
&
r
);
...
...
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