odbccp32/tests: Skip SQLGetInstalledDrivers() test if limited.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-06-28 12:05:12 +02:00 committed by Alexandre Julliard
parent 9b626f5120
commit 560010571a
1 changed files with 11 additions and 3 deletions

View File

@ -618,11 +618,19 @@ static void test_SQLGetInstalledDrivers(void)
{
char buffer[1000], *p;
WORD written, len;
BOOL ret, sql_ret;
DWORD error_code;
int found = 0;
BOOL ret;
SQLInstallDriverEx("Wine test\0Driver=test.dll\0\0", NULL, buffer,
sizeof(buffer), &written, ODBC_INSTALL_COMPLETE, NULL);
ret = SQLInstallDriverEx("Wine test\0Driver=test.dll\0\0", NULL, buffer,
sizeof(buffer), &written, ODBC_INSTALL_COMPLETE, NULL);
ok(ret, "SQLInstallDriverEx failed: %d\n", ret);
sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
if (sql_ret && error_code == ODBC_ERROR_WRITING_SYSINFO_FAILED)
{
skip("not enough privileges\n");
return;
}
ret = SQLGetInstalledDrivers(NULL, sizeof(buffer), &written);
ok(!ret, "got %d\n", ret);