Modified:
trunk/test/my_cursor.c
Log:
Fix my_setpos_cursor to actually test its results, not just the number of rows
Modified: trunk/test/my_cursor.c
===================================================================
--- trunk/test/my_cursor.c 2007-04-30 21:20:09 UTC (rev 350)
+++ trunk/test/my_cursor.c 2007-04-30 21:29:05 UTC (rev 351)
@@ -216,8 +216,20 @@
/* Now fetch and verify the data */
ok_sql(hstmt, "SELECT * FROM my_demo_cursor");
- is_num(myresult(hstmt), 3);
+ ok_stmt(hstmt, SQLFetch(hstmt));
+ is_num(my_fetch_int(hstmt, 1), 0);
+ is_str(my_fetch_str(hstmt, name, 2), "first-row", 9);
+ ok_stmt(hstmt, SQLFetch(hstmt));
+ is_num(my_fetch_int(hstmt, 1), 3);
+ is_str(my_fetch_str(hstmt, name, 2), "MySQL3", 6);
+
+ ok_stmt(hstmt, SQLFetch(hstmt));
+ is_num(my_fetch_int(hstmt, 1), 4);
+ is_str(my_fetch_str(hstmt, name, 2), "updated", 7);
+
+ expect_stmt(hstmt, SQLFetch(hstmt), SQL_NO_DATA_FOUND);
+
ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_CLOSE));
ok_sql(hstmt, "DROP TABLE my_demo_cursor");
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r351 - trunk/test | jwinstead | 30 Apr |