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
3fa1b837
Commit
3fa1b837
authored
Oct 21, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix volume tests compilation with __WINESRC__ defined.
parent
7dab5fe9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
volume.c
dlls/kernel32/tests/volume.c
+15
-15
No files found.
dlls/kernel32/tests/volume.c
View file @
3fa1b837
...
...
@@ -122,7 +122,7 @@ static void test_define_dos_deviceA(void)
}
/* Map it to point to the current directory */
ret
=
GetCurrentDirectory
(
sizeof
(
buf
),
buf
);
ret
=
GetCurrentDirectory
A
(
sizeof
(
buf
),
buf
);
ok
(
ret
,
"GetCurrentDir
\n
"
);
ret
=
DefineDosDeviceA
(
0
,
drivestr
,
buf
);
...
...
@@ -368,26 +368,26 @@ static void test_GetVolumeInformationA(void)
}
/* get windows drive letter and update strings for testing */
result
=
GetWindowsDirectory
(
windowsdir
,
sizeof
(
windowsdir
));
result
=
GetWindowsDirectory
A
(
windowsdir
,
sizeof
(
windowsdir
));
ok
(
result
<
sizeof
(
windowsdir
),
"windowsdir is abnormally long!
\n
"
);
ok
(
result
!=
0
,
"GetWindowsDirectory: error %d
\n
"
,
GetLastError
());
Root_Colon
[
0
]
=
windowsdir
[
0
];
Root_Slash
[
0
]
=
windowsdir
[
0
];
Root_UNC
[
4
]
=
windowsdir
[
0
];
result
=
GetCurrentDirectory
(
MAX_PATH
,
currentdir
);
result
=
GetCurrentDirectory
A
(
MAX_PATH
,
currentdir
);
ok
(
result
,
"GetCurrentDirectory: error %d
\n
"
,
GetLastError
());
/* Note that GetCurrentDir yields no trailing slash for subdirs */
/* check for NO error on no trailing \ when current dir is root dir */
ret
=
SetCurrentDirectory
(
Root_Slash
);
ret
=
SetCurrentDirectory
A
(
Root_Slash
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
ret
=
pGetVolumeInformationA
(
Root_Colon
,
vol_name_buf
,
vol_name_size
,
NULL
,
NULL
,
NULL
,
fs_name_buf
,
fs_name_len
);
ok
(
ret
,
"GetVolumeInformationA root failed, last error %u
\n
"
,
GetLastError
());
/* check for error on no trailing \ when current dir is subdir (windows) of queried drive */
ret
=
SetCurrentDirectory
(
windowsdir
);
ret
=
SetCurrentDirectory
A
(
windowsdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
pGetVolumeInformationA
(
Root_Colon
,
vol_name_buf
,
vol_name_size
,
NULL
,
...
...
@@ -396,7 +396,7 @@ static void test_GetVolumeInformationA(void)
"GetVolumeInformationA did%s fail, last error %u
\n
"
,
ret
?
" not"
:
""
,
GetLastError
());
/* reset current directory */
ret
=
SetCurrentDirectory
(
currentdir
);
ret
=
SetCurrentDirectory
A
(
currentdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
if
(
toupper
(
currentdir
[
0
])
==
toupper
(
windowsdir
[
0
]))
{
...
...
@@ -408,12 +408,12 @@ static void test_GetVolumeInformationA(void)
/* C:\windows becomes the current directory on drive C: */
/* Note that paths to subdirs are stored without trailing slash, like what GetCurrentDir yields. */
ret
=
SetEnvironmentVariable
(
Root_Env
,
windowsdir
);
ret
=
SetEnvironmentVariable
A
(
Root_Env
,
windowsdir
);
ok
(
ret
,
"SetEnvironmentVariable %s failed
\n
"
,
Root_Env
);
ret
=
SetCurrentDirectory
(
windowsdir
);
ret
=
SetCurrentDirectory
A
(
windowsdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
ret
=
SetCurrentDirectory
(
currentdir
);
ret
=
SetCurrentDirectory
A
(
currentdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
/* windows dir is current on the root drive, call fails */
...
...
@@ -428,9 +428,9 @@ static void test_GetVolumeInformationA(void)
NULL
,
NULL
,
fs_name_buf
,
fs_name_len
);
ok
(
ret
,
"GetVolumeInformationA with
\\
failed, last error %u
\n
"
,
GetLastError
());
ret
=
SetCurrentDirectory
(
Root_Slash
);
ret
=
SetCurrentDirectory
A
(
Root_Slash
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
ret
=
SetCurrentDirectory
(
currentdir
);
ret
=
SetCurrentDirectory
A
(
currentdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
/* windows dir is STILL CURRENT on root drive; the call fails as before, */
...
...
@@ -442,7 +442,7 @@ static void test_GetVolumeInformationA(void)
"GetVolumeInformationA did%s fail, last error %u
\n
"
,
ret
?
" not"
:
""
,
GetLastError
());
/* Now C:\ becomes the current directory on drive C: */
ret
=
SetEnvironmentVariable
(
Root_Env
,
Root_Slash
);
/* set =C:=C:\ */
ret
=
SetEnvironmentVariable
A
(
Root_Env
,
Root_Slash
);
/* set =C:=C:\ */
ok
(
ret
,
"SetEnvironmentVariable %s failed
\n
"
,
Root_Env
);
/* \ is current on root drive, call succeeds */
...
...
@@ -451,9 +451,9 @@ static void test_GetVolumeInformationA(void)
ok
(
ret
,
"GetVolumeInformationA failed, last error %u
\n
"
,
GetLastError
());
/* again, SetCurrentDirectory on another drive does not matter */
ret
=
SetCurrentDirectory
(
Root_Slash
);
ret
=
SetCurrentDirectory
A
(
Root_Slash
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
ret
=
SetCurrentDirectory
(
currentdir
);
ret
=
SetCurrentDirectory
A
(
currentdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
/* \ is current on root drive, call succeeds */
...
...
@@ -533,7 +533,7 @@ static void test_enum_vols(void)
}
/*get windows drive letter and update strings for testing */
ret
=
GetWindowsDirectory
(
windowsdir
,
sizeof
(
windowsdir
)
);
ret
=
GetWindowsDirectory
A
(
windowsdir
,
sizeof
(
windowsdir
)
);
ok
(
ret
<
sizeof
(
windowsdir
),
"windowsdir is abnormally long!
\n
"
);
ok
(
ret
!=
0
,
"GetWindowsDirecory: error %d
\n
"
,
GetLastError
());
path
[
0
]
=
windowsdir
[
0
];
...
...
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