msi/tests: SQLGetInstalledDrivers fails if there are no ODBC drivers installed.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bd755f4f0f
commit
1be65cbb46
|
@ -1424,9 +1424,10 @@ UINT WINAPI odbc_present(MSIHANDLE hinst)
|
||||||
WORD len;
|
WORD len;
|
||||||
BOOL r;
|
BOOL r;
|
||||||
|
|
||||||
|
buffer[0] = 0;
|
||||||
|
len = sizeof(buffer);
|
||||||
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
|
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
|
||||||
ok(hinst, len < sizeof(buffer), "buffer too small\n");
|
if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n");
|
||||||
ok(hinst, r, "SQLGetInstalledDrivers failed\n");
|
|
||||||
for (p = buffer; *p; p += strlen(p) + 1)
|
for (p = buffer; *p; p += strlen(p) + 1)
|
||||||
{
|
{
|
||||||
if (!strcmp(p, "ODBC test driver"))
|
if (!strcmp(p, "ODBC test driver"))
|
||||||
|
@ -1446,9 +1447,10 @@ UINT WINAPI odbc_absent(MSIHANDLE hinst)
|
||||||
WORD len;
|
WORD len;
|
||||||
BOOL r;
|
BOOL r;
|
||||||
|
|
||||||
|
buffer[0] = 0;
|
||||||
|
len = sizeof(buffer);
|
||||||
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
|
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
|
||||||
ok(hinst, len < sizeof(buffer), "buffer too small\n");
|
if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n");
|
||||||
ok(hinst, r, "SQLGetInstalledDrivers failed\n");
|
|
||||||
for (p = buffer; *p; p += strlen(p) + 1)
|
for (p = buffer; *p; p += strlen(p) + 1)
|
||||||
{
|
{
|
||||||
if (!strcmp(p, "ODBC test driver"))
|
if (!strcmp(p, "ODBC test driver"))
|
||||||
|
|
Loading…
Reference in New Issue