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
da5b7704
Commit
da5b7704
authored
Jan 29, 2017
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit/tests: Add tests for importing Win 3.1 registry files.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b0d475b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
regedit.c
programs/regedit/tests/regedit.c
+56
-0
No files found.
programs/regedit/tests/regedit.c
View file @
da5b7704
...
...
@@ -314,6 +314,61 @@ static void test_basic_import(void)
ok
(
lr
==
ERROR_SUCCESS
,
"RegDeleteKeyA failed: %d
\n
"
,
lr
);
}
static
void
test_basic_import_31
(
void
)
{
HKEY
hkey
;
LONG
lr
;
lr
=
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
KEY_BASE
);
ok
(
lr
==
ERROR_SUCCESS
||
lr
==
ERROR_FILE_NOT_FOUND
,
"RegDeleteKeyA failed: %d
\n
"
,
lr
);
/* Test simple value */
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
" = Value0
\r\n
"
);
lr
=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
KEY_BASE
,
0
,
KEY_READ
,
&
hkey
);
ok
(
lr
==
ERROR_SUCCESS
,
"RegOpenKeyExA failed: %d
\n
"
,
lr
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"Value0"
,
7
,
0
);
/* Test proper handling of spaces and equals signs */
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
" =Value1
\r\n
"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"Value1"
,
7
,
0
);
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
" = Value2
\r\n
"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
" Value2"
,
8
,
0
);
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
" = Value3
\r\n
"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"Value3 "
,
8
,
0
);
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
" Value4
\r\n
"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"Value4"
,
7
,
0
);
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
" Value5
\r\n
"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"Value5"
,
7
,
0
);
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
"
\r\n
"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
""
,
1
,
0
);
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
"
\r\n
"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
""
,
1
,
0
);
exec_import_str
(
"REGEDIT
\r\n
"
"HKEY_CLASSES_ROOT
\\
"
KEY_BASE
" = No newline"
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"No newline"
,
11
,
TODO_REG_SIZE
|
TODO_REG_DATA
);
RegCloseKey
(
hkey
);
lr
=
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
KEY_BASE
);
ok
(
lr
==
ERROR_SUCCESS
,
"RegDeleteKeyA failed: %d
\n
"
,
lr
);
}
static
void
test_invalid_import
(
void
)
{
LONG
lr
;
...
...
@@ -493,6 +548,7 @@ START_TEST(regedit)
supports_wchar
=
exec_import_wstr
(
wchar_test
);
test_basic_import
();
test_basic_import_31
();
test_invalid_import
();
test_comments
();
}
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