Added:
trunk/testsuites/t_bug_concat/
trunk/testsuites/t_bug_concat/bug29402.c
trunk/testsuites/t_bug_concat/t_bug_concat.h
trunk/testsuites/t_bug_concat/t_bug_concat_suite.c
Modified:
trunk/doc/suite_description.readme
trunk/etc/test4v3.conf
Log:
add t_bug_concat for testing bug 29402
Modified: trunk/doc/suite_description.readme
===================================================================
--- trunk/doc/suite_description.readme 2007-07-13 19:46:54 UTC (rev 159)
+++ trunk/doc/suite_description.readme 2007-07-17 15:27:41 UTC (rev 160)
@@ -2,6 +2,13 @@
here is the description, which functionality
they have:
+t_bug_concat (V3)
+ This testsuite is to test bug 29402.
+ It make a select concat(1,'a').
+ The test is ok, when the result is:
+ ok 2 - [master/bug_concat/concat]
+ ok 3 - [master/bug_concat - TEARDOWN]
+
t_bug_16258 (V3)
This testsuite is to test bug 16258.
It tries to make inserts into views that are not
Modified: trunk/etc/test4v3.conf
===================================================================
--- trunk/etc/test4v3.conf 2007-07-13 19:46:54 UTC (rev 159)
+++ trunk/etc/test4v3.conf 2007-07-17 15:27:41 UTC (rev 160)
@@ -3,5 +3,6 @@
t_bug_union_select
t_bug_foreign_key
t_bug_fuction_devision
+t_bug_concat
t_sql
t_bugs_time
Added: trunk/testsuites/t_bug_concat/bug29402.c
===================================================================
--- trunk/testsuites/t_bug_concat/bug29402.c 2007-07-13 19:46:54 UTC (rev 159)
+++ trunk/testsuites/t_bug_concat/bug29402.c 2007-07-17 15:27:41 UTC (rev 160)
@@ -0,0 +1,31 @@
+/* ******************************************
+ * This test shows bug 29402
+
+ * created: 07/17/2007 susanne
+
+ ****************************************** */
+
+
+#include "t_bug_concat.h"
+
+OT_TEST_METHOD(concat)
+{
+ SQLRETURN rc;
+ int i= 0;
+ SQLHANDLE stmt= get_statement();
+ SQLLEN len;
+ char *qry= "select concat(1,'a') as text";
+
+ CHECK_SQL_S(SQLExecDirect(stmt, (SQLCHAR *)qry, SQL_NTS), stmt);
+
+ for (i= 0; (rc= SQLFetch(stmt)) == SQL_SUCCESS; ++i)
+ {
+ SQLCHAR rs [STRLEN];
+ CHECK_SQL_S(SQLGetData(stmt, 1, SQL_C_CHAR,
+ rs, STRLEN, &len), stmt);
+ test_printf("result: %s\n",rs);
+ if(strncmp(rs,"1a",2) != 0)
+ OT_FAIL("Wrong data result at the view");
+ }
+ free_statement(stmt);
+}
Added: trunk/testsuites/t_bug_concat/t_bug_concat.h
===================================================================
--- trunk/testsuites/t_bug_concat/t_bug_concat.h 2007-07-13 19:46:54 UTC (rev 159)
+++ trunk/testsuites/t_bug_concat/t_bug_concat.h 2007-07-17 15:27:41 UTC (rev 160)
@@ -0,0 +1,13 @@
+#include "odbctest.h"
+
+/* test data definitions */
+extern const char *TD_DBNAME;
+
+extern const int TD_ALLTYPES_COLS;
+
+/* create tests */
+OT_TEST_METHOD(concat);
+
+
+
+
Added: trunk/testsuites/t_bug_concat/t_bug_concat_suite.c
===================================================================
--- trunk/testsuites/t_bug_concat/t_bug_concat_suite.c 2007-07-13 19:46:54 UTC (rev 159)
+++ trunk/testsuites/t_bug_concat/t_bug_concat_suite.c 2007-07-17 15:27:41 UTC (rev 160)
@@ -0,0 +1,22 @@
+#include "t_bug_concat.h"
+
+OT_SUITE_SETUP(bug_concat_suite_setup)
+{
+ if (!global_connect())
+ return "Cannot create global connection!";
+ else
+ return NULL;
+}
+
+OT_SUITE_TEARDOWN(bug_concat_suite_teardown)
+{
+ global_disconnect();
+ return NULL;
+}
+
+OT_SUITE_REGISTER_START("bug_concat",bug_concat_suite_setup,bug_concat_suite_teardown)
+/* create tests */
+OT_SUITE_ADD_TEST(concat, NULL, NULL);
+
+OT_SUITE_REGISTER_END
+
| Thread |
|---|
| • ODBC C-tests commit: r160 - in trunk: doc etc testsuites testsuites/t_bug_concat | sebrecht | 17 Jul |