Commit 55b89f4a authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Add some tests for MsiGetTargetPathW.

parent 843382f2
......@@ -843,7 +843,10 @@ static void test_doaction( void )
static void test_gettargetpath_bad(void)
{
static const WCHAR boo[] = {'b','o','o',0};
static const WCHAR empty[] = {0};
char buffer[0x80];
WCHAR bufferW[0x80];
MSIHANDLE hpkg;
DWORD sz;
UINT r;
......@@ -869,6 +872,32 @@ static void test_gettargetpath_bad(void)
r = MsiGetTargetPath( hpkg, "boo", buffer, NULL );
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 );
DeleteFile(msifile);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment