msi: Add some tests for MsiGetTargetPathW.
This commit is contained in:
parent
843382f284
commit
55b89f4a66
|
@ -843,7 +843,10 @@ static void test_doaction( void )
|
||||||
|
|
||||||
static void test_gettargetpath_bad(void)
|
static void test_gettargetpath_bad(void)
|
||||||
{
|
{
|
||||||
|
static const WCHAR boo[] = {'b','o','o',0};
|
||||||
|
static const WCHAR empty[] = {0};
|
||||||
char buffer[0x80];
|
char buffer[0x80];
|
||||||
|
WCHAR bufferW[0x80];
|
||||||
MSIHANDLE hpkg;
|
MSIHANDLE hpkg;
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
UINT r;
|
UINT r;
|
||||||
|
@ -869,6 +872,32 @@ static void test_gettargetpath_bad(void)
|
||||||
r = MsiGetTargetPath( hpkg, "boo", buffer, NULL );
|
r = MsiGetTargetPath( hpkg, "boo", buffer, NULL );
|
||||||
ok( r == ERROR_DIRECTORY, "wrong return val\n");
|
ok( r == ERROR_DIRECTORY, "wrong return val\n");
|
||||||
|
|
||||||
|
sz = 0;
|
||||||
|
r = MsiGetTargetPath( hpkg, "", buffer, &sz );
|
||||||
|
ok( r == ERROR_DIRECTORY, "wrong return val\n");
|
||||||
|
|
||||||
|
r = MsiGetTargetPathW( 0, NULL, NULL, NULL );
|
||||||
|
ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n");
|
||||||
|
|
||||||
|
r = MsiGetTargetPathW( 0, NULL, NULL, &sz );
|
||||||
|
ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n");
|
||||||
|
|
||||||
|
r = MsiGetTargetPathW( 0, boo, NULL, NULL );
|
||||||
|
ok( r == ERROR_INVALID_HANDLE, "wrong return val\n");
|
||||||
|
|
||||||
|
r = MsiGetTargetPathW( 0, boo, NULL, NULL );
|
||||||
|
ok( r == ERROR_INVALID_HANDLE, "wrong return val\n");
|
||||||
|
|
||||||
|
r = MsiGetTargetPathW( hpkg, boo, NULL, NULL );
|
||||||
|
ok( r == ERROR_DIRECTORY, "wrong return val\n");
|
||||||
|
|
||||||
|
r = MsiGetTargetPathW( hpkg, boo, bufferW, NULL );
|
||||||
|
ok( r == ERROR_DIRECTORY, "wrong return val\n");
|
||||||
|
|
||||||
|
sz = 0;
|
||||||
|
r = MsiGetTargetPathW( hpkg, empty, bufferW, &sz );
|
||||||
|
ok( r == ERROR_DIRECTORY, "wrong return val\n");
|
||||||
|
|
||||||
MsiCloseHandle( hpkg );
|
MsiCloseHandle( hpkg );
|
||||||
DeleteFile(msifile);
|
DeleteFile(msifile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue