https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6816ff8dbd3a3af612be1…
commit 6816ff8dbd3a3af612be1e115880567e8af8d71c
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Nov 10 14:10:31 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Nov 10 14:10:31 2019 +0100
[ODBCCP32_WINETEST] Sync with Wine Staging 4.18. CORE-16441
---
modules/rostests/winetests/odbccp32/misc.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/modules/rostests/winetests/odbccp32/misc.c
b/modules/rostests/winetests/odbccp32/misc.c
index dc65bdf3f9a..dc2ca7ed3f4 100644
--- a/modules/rostests/winetests/odbccp32/misc.c
+++ b/modules/rostests/winetests/odbccp32/misc.c
@@ -741,6 +741,31 @@ static void test_SQLValidDSNW(void)
ok(ret, "got %d\n", ret);
}
+static void test_SQLConfigDataSource(void)
+{
+ BOOL ret;
+
+ ret = SQLConfigDataSource(0, ODBC_ADD_DSN, "SQL Server",
"DSN=WINEMQIS\0Database=MQIS\0\0");
+ ok(ret, "got %d\n", ret);
+
+ ret = SQLConfigDataSource(0, ODBC_REMOVE_DSN, "SQL Server",
"DSN=WINEMQIS\0\0");
+ ok(ret, "got %d\n", ret);
+
+ ret = SQLConfigDataSource(0, ODBC_REMOVE_DSN, "SQL Server",
"DSN=WINEMQIS\0\0");
+ if(!ret)
+ {
+ RETCODE ret;
+ DWORD err;
+ ret = SQLInstallerError(1, &err, NULL, 0, NULL);
+ ok(ret == SQL_SUCCESS_WITH_INFO, "got %d\n", ret);
+ todo_wine ok(err == ODBC_ERROR_INVALID_DSN, "got %u\n", err);
+ }
+
+ ret = SQLConfigDataSource(0, ODBC_ADD_DSN, "ODBC driver", "DSN=ODBC
data source\0\0");
+ todo_wine ok(!ret, "got %d\n", ret);
+ todo_wine check_error(ODBC_ERROR_COMPONENT_NOT_FOUND);
+}
+
START_TEST(misc)
{
test_SQLConfigMode();
@@ -754,4 +779,5 @@ START_TEST(misc)
test_SQLGetInstalledDrivers();
test_SQLValidDSN();
test_SQLValidDSNW();
+ test_SQLConfigDataSource();
}