Benjamin Arai : msi: Adds test to check "JOIN" operator with "*" operator for the SELECT clause returns the correct results.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 25 09:46:36 CDT 2006


Module: wine
Branch: master
Commit: 4195697cc1405ecc9de4bb0d10790bbf4d37dd32
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=4195697cc1405ecc9de4bb0d10790bbf4d37dd32

Author: Benjamin Arai <me at benjaminarai.com>
Date:   Wed Sep 20 17:00:35 2006 -0700

msi: Adds test to check "JOIN" operator with "*" operator for the SELECT clause returns the correct results.

---

 dlls/msi/tests/db.c |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index d75d44e..5ccd731 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -2286,6 +2286,62 @@ static void test_join(void)
     MsiViewClose(hview);
     MsiCloseHandle(hview);
 
+    query = "SELECT * FROM `StdDlls`, `Binary` ";
+    r = MsiDatabaseOpenView(hdb, query, &hview);
+    todo_wine
+    {
+        ok( r == ERROR_SUCCESS, "failed to open view: %d\n", r );
+    }
+
+    r = MsiViewExecute(hview, 0);
+    todo_wine
+    {
+        ok( r == ERROR_SUCCESS, "failed to execute view: %d\n", r );
+    }
+
+    i = 0;
+    while ((r = MsiViewFetch(hview, &hrec)) == ERROR_SUCCESS)
+    {
+        count = MsiRecordGetFieldCount( hrec );
+        ok( count == 4, "Expected 4 record fields, got %d\n", count );
+
+        size = MAX_PATH;
+        r = MsiRecordGetString( hrec, 1, buf, &size );
+        ok( r == ERROR_SUCCESS, "failed to get record string: %d\n", r );
+        ok( !lstrcmp( buf, join_res_eighth[i].one ),
+            "For (row %ld, column 1) expected '%s', got %s\n", i, join_res_eighth[i].one, buf );
+
+        size = MAX_PATH;
+        r = MsiRecordGetString( hrec, 2, buf, &size );
+        ok( r == ERROR_SUCCESS, "failed to get record string: %d\n", r );
+        ok( !lstrcmp( buf, join_res_eighth[i].two ),
+            "For (row %ld, column 2) expected '%s', got %s\n", i, join_res_eighth[i].two, buf );
+
+        size = MAX_PATH;
+        r = MsiRecordGetString( hrec, 3, buf, &size );
+        ok( r == ERROR_SUCCESS, "failed to get record string: %d\n", r );
+        ok( !lstrcmp( buf, join_res_eighth[i].three ),
+            "For (row %ld, column 3) expected '%s', go %s\n", i, join_res_eighth[i].three, buf );
+
+        size = MAX_PATH;
+        r = MsiRecordGetString( hrec, 4, buf, &size );
+        ok( r == ERROR_SUCCESS, "failed to get record string: %d\n", r );
+        ok( !lstrcmp( buf, join_res_eighth[i].four ),
+            "For (row %ld, column 4) expected '%s', got %s\n", i, join_res_eighth[i].four, buf );
+
+        i++;
+        MsiCloseHandle(hrec);
+    }
+
+    todo_wine
+    {
+        ok( i == 6, "Expected 6 rows, got %ld\n", i );
+        ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r );
+    }
+
+    MsiViewClose(hview);
+    MsiCloseHandle(hview);
+
     MsiCloseHandle(hdb);
     DeleteFile(msifile);
 }




More information about the wine-cvs mailing list