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
63cdb0b9
Commit
63cdb0b9
authored
Feb 06, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Add more tests for SetupInstallFilesFromInfSection().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef77468b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
install.c
dlls/setupapi/tests/install.c
+26
-3
No files found.
dlls/setupapi/tests/install.c
View file @
63cdb0b9
...
@@ -1065,9 +1065,13 @@ static void test_install_files_queue(void)
...
@@ -1065,9 +1065,13 @@ static void test_install_files_queue(void)
{
{
static
const
char
inf_data
[]
=
"[Version]
\n
"
static
const
char
inf_data
[]
=
"[Version]
\n
"
"Signature=
\"
$Chicago$
\"\n
"
"Signature=
\"
$Chicago$
\"\n
"
"[DefaultInstall]
\n
"
"[DefaultInstall]
\n
"
"CopyFiles=files_section
\n
"
"CopyFiles=copy_section
\n
"
"[files_section]
\n
"
"DelFiles=delete_section
\n
"
"RenFiles=rename_section
\n
"
"[copy_section]
\n
"
"one.txt
\n
"
"one.txt
\n
"
"two.txt
\n
"
"two.txt
\n
"
"three.txt
\n
"
"three.txt
\n
"
...
@@ -1076,11 +1080,19 @@ static void test_install_files_queue(void)
...
@@ -1076,11 +1080,19 @@ static void test_install_files_queue(void)
"six.txt
\n
"
"six.txt
\n
"
"seven.txt
\n
"
"seven.txt
\n
"
"eight.txt
\n
"
"eight.txt
\n
"
"[delete_section]
\n
"
"nine.txt
\n
"
"[rename_section]
\n
"
"eleven.txt,ten.txt
\n
"
"[SourceDisksNames]
\n
"
"[SourceDisksNames]
\n
"
"1=heis
\n
"
"1=heis
\n
"
"2=duo,,,alpha
\n
"
"2=duo,,,alpha
\n
"
"3=treis,treis.cab
\n
"
"3=treis,treis.cab
\n
"
"4=tessares,tessares.cab,,alpha
\n
"
"4=tessares,tessares.cab,,alpha
\n
"
"[SourceDisksFiles]
\n
"
"[SourceDisksFiles]
\n
"
"one.txt=1
\n
"
"one.txt=1
\n
"
"two.txt=1,beta
\n
"
"two.txt=1,beta
\n
"
...
@@ -1090,8 +1102,11 @@ static void test_install_files_queue(void)
...
@@ -1090,8 +1102,11 @@ static void test_install_files_queue(void)
"six.txt=3,beta
\n
"
"six.txt=3,beta
\n
"
"seven.txt=4
\n
"
"seven.txt=4
\n
"
"eight.txt=4,beta
\n
"
"eight.txt=4,beta
\n
"
"[DestinationDirs]
\n
"
"[DestinationDirs]
\n
"
"files_section=40000,dst
\n
"
;
"copy_section=40000,dst
\n
"
"delete_section=40000,dst
\n
"
"rename_section=40000,dst
\n
"
;
char
path
[
MAX_PATH
+
9
];
char
path
[
MAX_PATH
+
9
];
HSPFILEQ
queue
;
HSPFILEQ
queue
;
...
@@ -1116,12 +1131,17 @@ static void test_install_files_queue(void)
...
@@ -1116,12 +1131,17 @@ static void test_install_files_queue(void)
ret
=
SetupSetDirectoryIdA
(
hinf
,
40000
,
CURR_DIR
);
ret
=
SetupSetDirectoryIdA
(
hinf
,
40000
,
CURR_DIR
);
ok
(
ret
,
"Failed to set directory ID, error %u.
\n
"
,
GetLastError
());
ok
(
ret
,
"Failed to set directory ID, error %u.
\n
"
,
GetLastError
());
ret
=
CreateDirectoryA
(
"dst"
,
NULL
);
ok
(
ret
,
"Failed to create test directory, error %u.
\n
"
,
GetLastError
());
create_file
(
"src/one.txt"
);
create_file
(
"src/one.txt"
);
create_file
(
"src/beta/two.txt"
);
create_file
(
"src/beta/two.txt"
);
create_file
(
"src/alpha/three.txt"
);
create_file
(
"src/alpha/three.txt"
);
create_file
(
"src/alpha/beta/four.txt"
);
create_file
(
"src/alpha/beta/four.txt"
);
create_cab_file
(
"src/treis.cab"
,
"src
\\
beta
\\
five.txt
\0
six.txt
\0
"
);
create_cab_file
(
"src/treis.cab"
,
"src
\\
beta
\\
five.txt
\0
six.txt
\0
"
);
create_cab_file
(
"src/alpha/tessares.cab"
,
"seven.txt
\0
eight.txt
\0
"
);
create_cab_file
(
"src/alpha/tessares.cab"
,
"seven.txt
\0
eight.txt
\0
"
);
create_file
(
"dst/nine.txt"
);
create_file
(
"dst/ten.txt"
);
queue
=
SetupOpenFileQueue
();
queue
=
SetupOpenFileQueue
();
ok
(
queue
!=
INVALID_HANDLE_VALUE
,
"Failed to open queue, error %#x.
\n
"
,
GetLastError
());
ok
(
queue
!=
INVALID_HANDLE_VALUE
,
"Failed to open queue, error %#x.
\n
"
,
GetLastError
());
...
@@ -1147,6 +1167,9 @@ static void test_install_files_queue(void)
...
@@ -1147,6 +1167,9 @@ static void test_install_files_queue(void)
ok
(
delete_file
(
"dst/six.txt"
),
"Destination file should exist.
\n
"
);
ok
(
delete_file
(
"dst/six.txt"
),
"Destination file should exist.
\n
"
);
ok
(
delete_file
(
"dst/seven.txt"
),
"Destination file should exist.
\n
"
);
ok
(
delete_file
(
"dst/seven.txt"
),
"Destination file should exist.
\n
"
);
ok
(
delete_file
(
"dst/eight.txt"
),
"Destination file should exist.
\n
"
);
ok
(
delete_file
(
"dst/eight.txt"
),
"Destination file should exist.
\n
"
);
todo_wine
ok
(
!
delete_file
(
"dst/nine.txt"
),
"Destination file should not exist.
\n
"
);
todo_wine
ok
(
!
delete_file
(
"dst/ten.txt"
),
"Destination file should not exist.
\n
"
);
todo_wine
ok
(
delete_file
(
"dst/eleven.txt"
),
"Destination file should exist.
\n
"
);
SetupTermDefaultQueueCallback
(
context
);
SetupTermDefaultQueueCallback
(
context
);
ret
=
SetupCloseFileQueue
(
queue
);
ret
=
SetupCloseFileQueue
(
queue
);
...
...
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