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
480731ae
Commit
480731ae
authored
Nov 07, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Fix Listbox test failures on some configurations.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
282bdd33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
listbox.c
dlls/comctl32/tests/listbox.c
+16
-2
No files found.
dlls/comctl32/tests/listbox.c
View file @
480731ae
...
...
@@ -793,6 +793,7 @@ static void test_listbox_item_data(void)
static
void
test_listbox_LB_DIR
(
void
)
{
char
path
[
MAX_PATH
],
curdir
[
MAX_PATH
];
HWND
hList
;
int
res
,
itemCount
;
int
itemCount_justFiles
;
...
...
@@ -805,6 +806,16 @@ static void test_listbox_LB_DIR(void)
char
driveletter
;
const
char
*
wildcard
=
"*"
;
HANDLE
file
;
BOOL
ret
;
GetCurrentDirectoryA
(
ARRAY_SIZE
(
curdir
),
curdir
);
GetTempPathA
(
ARRAY_SIZE
(
path
),
path
);
ret
=
SetCurrentDirectoryA
(
path
);
ok
(
ret
,
"Failed to set current directory.
\n
"
);
ret
=
CreateDirectoryA
(
"lb_dir_test"
,
NULL
);
ok
(
ret
,
"Failed to create test directory.
\n
"
);
file
=
CreateFileA
(
"wtest1.tmp.c"
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"Error creating the test file: %d
\n
"
,
GetLastError
());
...
...
@@ -1135,11 +1146,11 @@ static void test_listbox_LB_DIR(void)
itemCount
,
itemCount_allDirs
);
ok
(
res
+
1
==
itemCount
,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) returned incorrect index!
\n
"
);
if
(
itemCount
&&
GetCurrentDirectoryA
(
MAX_PATH
,
pathBuffer
)
>
3
)
/* there's no [..] in drive root */
if
(
itemCount
)
{
memset
(
pathBuffer
,
0
,
MAX_PATH
);
SendMessageA
(
hList
,
LB_GETTEXT
,
0
,
(
LPARAM
)
pathBuffer
);
ok
(
!
strcmp
(
pathBuffer
,
"[..]"
),
"First element is
not [..]
\n
"
);
ok
(
!
strcmp
(
pathBuffer
,
"[..]"
),
"First element is
%s, not [..]
\n
"
,
pathBuffer
);
}
/* This tests behavior when no files match the wildcard */
...
...
@@ -1224,6 +1235,9 @@ static void test_listbox_LB_DIR(void)
DestroyWindow
(
hList
);
DeleteFileA
(
"wtest1.tmp.c"
);
RemoveDirectoryA
(
"lb_dir_test"
);
SetCurrentDirectoryA
(
curdir
);
}
static
HWND
g_listBox
;
...
...
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