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
ed4b6e91
Commit
ed4b6e91
authored
Sep 29, 2006
by
Louis. Lenders
Committed by
Alexandre Julliard
Oct 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add 2 simple tests for GetLongPathNameW.
parent
44da2475
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
path.c
dlls/kernel32/tests/path.c
+24
-0
No files found.
dlls/kernel32/tests/path.c
View file @
ed4b6e91
...
...
@@ -50,6 +50,7 @@ static const CHAR funny_chars[]="!@#$%^&*()=+{}[],?'`";
static
const
CHAR
is_char_ok
[]
=
"11111110111111111011"
;
static
DWORD
(
WINAPI
*
pGetLongPathNameA
)(
LPCSTR
,
LPSTR
,
DWORD
);
static
DWORD
(
WINAPI
*
pGetLongPathNameW
)(
LPWSTR
,
LPWSTR
,
DWORD
);
/* a structure to deal with wine todos somewhat cleanly */
typedef
struct
{
...
...
@@ -929,14 +930,37 @@ static void test_GetTempPath(void)
SetEnvironmentVariableA
(
"TMP"
,
save_TMP
);
}
static
void
test_GetLongPathNameW
(
void
)
{
DWORD
length
;
WCHAR
empty
[
MAX_PATH
];
SetLastError
(
0xdeadbeef
);
length
=
pGetLongPathNameW
(
NULL
,
NULL
,
0
);
if
(
pGetLongPathNameW
)
{
ok
(
0
==
length
,
"GetLongPathNameW returned %ld but expected 0
\n
"
,
length
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"GetLastError returned %lx but expected ERROR_INVALID_PARAMETER"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
empty
[
0
]
=
0
;
length
=
pGetLongPathNameW
(
empty
,
NULL
,
0
);
ok
(
0
==
length
,
"GetLongPathNameW returned %ld but expected 0
\n
"
,
length
);
ok
(
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"GetLastError returned %lx but expected ERROR_PATH_NOT_FOUND
\n
"
,
GetLastError
());
}
}
START_TEST
(
path
)
{
CHAR
origdir
[
MAX_PATH
],
curdir
[
MAX_PATH
],
curDrive
,
otherDrive
;
pGetLongPathNameA
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32.dll"
),
"GetLongPathNameA"
);
pGetLongPathNameW
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32.dll"
)
,
"GetLongPathNameW"
);
test_InitPathA
(
curdir
,
&
curDrive
,
&
otherDrive
);
test_CurrentDirectoryA
(
origdir
,
curdir
);
test_PathNameA
(
curdir
,
curDrive
,
otherDrive
);
test_CleanupPathA
(
origdir
,
curdir
);
test_GetTempPath
();
test_GetLongPathNameW
();
}
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