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
3814e022
Commit
3814e022
authored
Feb 27, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Implement GetExtensionName().
parent
2d15758c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
4 deletions
+53
-4
filesystem.c
dlls/scrrun/filesystem.c
+18
-4
filesystem.c
dlls/scrrun/tests/filesystem.c
+35
-0
No files found.
dlls/scrrun/filesystem.c
View file @
3814e022
...
...
@@ -3103,12 +3103,26 @@ static HRESULT WINAPI filesys_GetBaseName(IFileSystem3 *iface, BSTR Path,
return
S_OK
;
}
static
HRESULT
WINAPI
filesys_GetExtensionName
(
IFileSystem3
*
iface
,
BSTR
P
ath
,
BSTR
*
pbstrResul
t
)
static
HRESULT
WINAPI
filesys_GetExtensionName
(
IFileSystem3
*
iface
,
BSTR
p
ath
,
BSTR
*
ex
t
)
{
FIXME
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
Path
),
pbstrResult
)
;
INT
len
;
return
E_NOTIMPL
;
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
path
),
ext
);
*
ext
=
NULL
;
len
=
SysStringLen
(
path
);
while
(
len
)
{
if
(
path
[
len
-
1
]
==
'.'
)
{
*
ext
=
SysAllocString
(
&
path
[
len
]);
if
(
!*
ext
)
return
E_OUTOFMEMORY
;
break
;
}
len
--
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
filesys_GetAbsolutePathName
(
IFileSystem3
*
iface
,
BSTR
Path
,
...
...
dlls/scrrun/tests/filesystem.c
View file @
3814e022
...
...
@@ -1865,6 +1865,40 @@ static void test_SerialNumber(void)
IEnumVARIANT_Release
(
iter
);
}
static
const
struct
extension_test
{
WCHAR
path
[
20
];
WCHAR
ext
[
10
];
}
extension_tests
[]
=
{
{
{
'n'
,
'o'
,
'e'
,
'x'
,
't'
,
0
},
{
0
}
},
{
{
'n'
,
'.'
,
'o'
,
'.'
,
'e'
,
'x'
,
't'
,
0
},
{
'e'
,
'x'
,
't'
,
0
}
},
{
{
'n'
,
'.'
,
'o'
,
'.'
,
'e'
,
'X'
,
't'
,
0
},
{
'e'
,
'X'
,
't'
,
0
}
},
{
{
0
}
}
};
static
void
test_GetExtensionName
(
void
)
{
BSTR
path
,
ext
;
HRESULT
hr
;
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
extension_tests
)
/
sizeof
(
extension_tests
[
0
]);
i
++
)
{
path
=
SysAllocString
(
extension_tests
[
i
].
path
);
ext
=
NULL
;
hr
=
IFileSystem3_GetExtensionName
(
fs3
,
path
,
&
ext
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
*
extension_tests
[
i
].
ext
)
ok
(
!
lstrcmpW
(
ext
,
extension_tests
[
i
].
ext
),
"%d: path %s, got %s, expected %s
\n
"
,
i
,
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
ext
),
wine_dbgstr_w
(
extension_tests
[
i
].
ext
));
else
ok
(
ext
==
NULL
,
"%d: path %s, got %s, expected %s
\n
"
,
i
,
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
ext
),
wine_dbgstr_w
(
extension_tests
[
i
].
ext
));
SysFreeString
(
path
);
SysFreeString
(
ext
);
}
}
START_TEST
(
filesystem
)
{
HRESULT
hr
;
...
...
@@ -1899,6 +1933,7 @@ START_TEST(filesystem)
test_Read
();
test_GetDriveName
();
test_SerialNumber
();
test_GetExtensionName
();
IFileSystem3_Release
(
fs3
);
...
...
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