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
c055a274
Commit
c055a274
authored
Nov 05, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add more directory change notification tests.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
689683df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
2 deletions
+38
-2
change.c
dlls/kernel32/tests/change.c
+38
-2
No files found.
dlls/kernel32/tests/change.c
View file @
c055a274
...
@@ -254,11 +254,12 @@ static void test_FindFirstChangeNotification(void)
...
@@ -254,11 +254,12 @@ static void test_FindFirstChangeNotification(void)
static
void
test_ffcn
(
void
)
static
void
test_ffcn
(
void
)
{
{
DWORD
filter
;
DWORD
filter
;
HANDLE
handle
;
HANDLE
handle
,
file
;
LONG
r
;
LONG
r
;
WCHAR
path
[
MAX_PATH
],
subdir
[
MAX_PATH
];
WCHAR
path
[
MAX_PATH
],
subdir
[
MAX_PATH
]
,
filename
[
MAX_PATH
]
;
static
const
WCHAR
szBoo
[]
=
{
'\\'
,
'b'
,
'o'
,
'o'
,
0
};
static
const
WCHAR
szBoo
[]
=
{
'\\'
,
'b'
,
'o'
,
'o'
,
0
};
static
const
WCHAR
szHoo
[]
=
{
'\\'
,
'h'
,
'o'
,
'o'
,
0
};
static
const
WCHAR
szHoo
[]
=
{
'\\'
,
'h'
,
'o'
,
'o'
,
0
};
static
const
WCHAR
szZoo
[]
=
{
'\\'
,
'z'
,
'o'
,
'o'
,
0
};
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
r
=
GetTempPathW
(
MAX_PATH
,
path
);
r
=
GetTempPathW
(
MAX_PATH
,
path
);
...
@@ -275,6 +276,9 @@ static void test_ffcn(void)
...
@@ -275,6 +276,9 @@ static void test_ffcn(void)
lstrcpyW
(
subdir
,
path
);
lstrcpyW
(
subdir
,
path
);
lstrcatW
(
subdir
,
szHoo
);
lstrcatW
(
subdir
,
szHoo
);
lstrcpyW
(
filename
,
path
);
lstrcatW
(
filename
,
szZoo
);
RemoveDirectoryW
(
subdir
);
RemoveDirectoryW
(
subdir
);
RemoveDirectoryW
(
path
);
RemoveDirectoryW
(
path
);
...
@@ -290,6 +294,38 @@ static void test_ffcn(void)
...
@@ -290,6 +294,38 @@ static void test_ffcn(void)
r
=
WaitForSingleObject
(
handle
,
0
);
r
=
WaitForSingleObject
(
handle
,
0
);
ok
(
r
==
STATUS_TIMEOUT
,
"should time out
\n
"
);
ok
(
r
==
STATUS_TIMEOUT
,
"should time out
\n
"
);
file
=
CreateFileW
(
filename
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
0
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile error %u
\n
"
,
GetLastError
()
);
CloseHandle
(
file
);
r
=
WaitForSingleObject
(
handle
,
0
);
ok
(
r
==
WAIT_OBJECT_0
,
"should be ready
\n
"
);
r
=
WaitForSingleObject
(
handle
,
0
);
ok
(
r
==
WAIT_OBJECT_0
,
"should be ready
\n
"
);
r
=
FindNextChangeNotification
(
handle
);
ok
(
r
==
TRUE
,
"find next failed
\n
"
);
r
=
WaitForSingleObject
(
handle
,
0
);
ok
(
r
==
STATUS_TIMEOUT
,
"should time out
\n
"
);
r
=
DeleteFileW
(
filename
);
ok
(
r
==
TRUE
,
"failed to remove file
\n
"
);
r
=
WaitForSingleObject
(
handle
,
0
);
ok
(
r
==
WAIT_OBJECT_0
,
"should be ready
\n
"
);
r
=
WaitForSingleObject
(
handle
,
0
);
ok
(
r
==
WAIT_OBJECT_0
,
"should be ready
\n
"
);
r
=
FindNextChangeNotification
(
handle
);
ok
(
r
==
TRUE
,
"find next failed
\n
"
);
r
=
WaitForSingleObject
(
handle
,
0
);
ok
(
r
==
STATUS_TIMEOUT
,
"should time out
\n
"
);
r
=
CreateDirectoryW
(
subdir
,
NULL
);
r
=
CreateDirectoryW
(
subdir
,
NULL
);
ok
(
r
==
TRUE
,
"failed to create subdir
\n
"
);
ok
(
r
==
TRUE
,
"failed to create subdir
\n
"
);
...
...
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