mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[NTDSAPI_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
svn path=/trunk/; revision=69973
This commit is contained in:
parent
cc6dbe9490
commit
a7803a245b
1 changed files with 31 additions and 0 deletions
|
@ -84,7 +84,38 @@ static void test_DsMakeSpn(void)
|
|||
ok(spn_length == lstrlenW(wszSpn5) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn5) + 1, spn_length);
|
||||
}
|
||||
|
||||
static void test_DsClientMakeSpnForTargetServer(void)
|
||||
{
|
||||
static const WCHAR classW[] = {'c','l','a','s','s',0};
|
||||
static const WCHAR hostW[] = {'h','o','s','t','.','d','o','m','a','i','n',0};
|
||||
static const WCHAR resultW[] = {'c','l','a','s','s','/','h','o','s','t','.','d','o','m','a','i','n',0};
|
||||
DWORD ret, len;
|
||||
WCHAR buf[256];
|
||||
|
||||
ret = DsClientMakeSpnForTargetServerW( NULL, NULL, NULL, NULL );
|
||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
||||
|
||||
ret = DsClientMakeSpnForTargetServerW( classW, NULL, NULL, NULL );
|
||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
||||
|
||||
ret = DsClientMakeSpnForTargetServerW( classW, hostW, NULL, NULL );
|
||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
||||
|
||||
len = 0;
|
||||
ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, NULL );
|
||||
ok( ret == ERROR_BUFFER_OVERFLOW, "got %u\n", ret );
|
||||
ok( len == lstrlenW(resultW) + 1, "got %u\n", len );
|
||||
|
||||
len = sizeof(buf)/sizeof(buf[0]);
|
||||
buf[0] = 0;
|
||||
ret = DsClientMakeSpnForTargetServerW( classW, hostW, &len, buf );
|
||||
ok( ret == ERROR_SUCCESS, "got %u\n", ret );
|
||||
ok( len == lstrlenW(resultW) + 1, "got %u\n", len );
|
||||
ok( !lstrcmpW( buf, resultW ), "wrong data\n" );
|
||||
}
|
||||
|
||||
START_TEST( ntdsapi )
|
||||
{
|
||||
test_DsMakeSpn();
|
||||
test_DsClientMakeSpnForTargetServer();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue