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
efaa8013
Commit
efaa8013
authored
Aug 03, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Aug 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion/tests: Skip tests when file creation fails.
parent
66395882
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
asmenum.c
dlls/fusion/tests/asmenum.c
+21
-7
No files found.
dlls/fusion/tests/asmenum.c
View file @
efaa8013
...
...
@@ -147,13 +147,15 @@ static BOOL create_full_path(LPCSTR path)
return
ret
;
}
static
void
create_file_data
(
LPCSTR
name
,
LPCSTR
data
,
DWORD
size
)
static
BOOL
create_file_data
(
LPCSTR
name
,
LPCSTR
data
,
DWORD
size
)
{
HANDLE
file
;
DWORD
written
;
file
=
CreateFileA
(
name
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"Failure to open file %s
\n
"
,
name
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
WriteFile
(
file
,
data
,
strlen
(
data
),
&
written
,
NULL
);
if
(
size
)
...
...
@@ -163,10 +165,9 @@ static void create_file_data(LPCSTR name, LPCSTR data, DWORD size)
}
CloseHandle
(
file
);
return
TRUE
;
}
#define create_file(name, size) create_file_data(name, name, size)
static
void
test_CreateAssemblyEnum
(
void
)
{
HRESULT
hr
;
...
...
@@ -409,19 +410,31 @@ static void test_enumerate_name(void)
CreateDirectoryA
(
path
,
NULL
);
lstrcatA
(
path
,
"
\\
Wine.dll"
);
create_file
(
path
,
100
);
if
(
!
create_file_data
(
path
,
path
,
100
))
{
win_skip
(
"Failed to open file %s, skipping name enumeration tests
\n
"
,
path
);
goto
done
;
}
sprintf
(
path
,
"%s
\\
Wine
\\
1.0.1.2__16a3fcd171e93a8d"
,
gac
);
CreateDirectoryA
(
path
,
NULL
);
lstrcatA
(
path
,
"
\\
Wine.dll"
);
create_file
(
path
,
100
);
if
(
!
create_file_data
(
path
,
path
,
100
))
{
win_skip
(
"Failed to open file %s, skipping name enumeration tests
\n
"
,
path
);
goto
done
;
}
sprintf
(
path
,
"%s
\\
Wine
\\
1.0.1.2__123456789abcdef0"
,
gac
);
CreateDirectoryA
(
path
,
NULL
);
lstrcatA
(
path
,
"
\\
Wine.dll"
);
create_file
(
path
,
100
);
if
(
!
create_file_data
(
path
,
path
,
100
))
{
win_skip
(
"Failed to open file %s, skipping name enumeration tests
\n
"
,
path
);
goto
done
;
}
/* test case sensitivity */
to_widechar
(
namestr
,
"wine"
);
...
...
@@ -650,6 +663,7 @@ static void test_enumerate_name(void)
IAssemblyEnum_Release
(
asmenum
);
IAssemblyName_Release
(
asmname
);
done:
sprintf
(
path
,
"%s
\\
Wine
\\
1.0.0.0__16a3fcd171e93a8d
\\
Wine.dll"
,
gac
);
DeleteFileA
(
path
);
sprintf
(
path
,
"%s
\\
Wine
\\
1.0.1.2__16a3fcd171e93a8d
\\
Wine.dll"
,
gac
);
...
...
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