João Henrique Freitas writes: > > No, the libdbitest database does not exist on my system. So your test > > obviously has to fail if this is a prerequisite. > > > > Do you can perform the tests? >
Hi João, I finally got around to play with your cgreen test suite. I've created a MySQL database libdbitest to get around the above mentioned problem. The tests basically run ok, so the cgreen framework and your test code work properly, with a few minor problems remaining: (1) Failure!: LIBDBI fixture -> Database Infrastructure -> test_dbi_conn_get_table_list -> [test_datatypes] should match [ERROR] at [test_dbi_sql_database_infrastructure.c] line [9] This function attempts to read the table name from the result set using '3' as an index which has to fail. The index should be '1' instead. Using this value, MySQL passes the test. If your tests required '3' to succeed, most likely one of the database drivers does not implement dbi_conn_get_table_list() as intended: according to the docs the function (in fact, the corresponding driver function) should return the table names in column 1. (2) Failure!: LIBDBI fixture -> Retriving fields data by name -> test_dbi_result_get_string_copy -> [ERROR] should match [Can 'we' "quote" this properly?] at [test_dbi_retrieving_fields_data_name.c] line [316] Upon analyzing this error I've noticed that your code does not use the dbi_conn_quote_string() family of functions here. Instead you attempt to manually quote the input strings of the INSERT query. Wouldn't it be easier to use the quoted strings when assembling your INSERT query? In any case, the code for assembling the MySQL INSERT query is obviously broken. (3) Failure!: LIBDBI fixture -> Test select cases -> test_retrieve_zero_rows -> Value: '0x0' Error 1146: 'root' at [test_dbi_misc.c] line [8] Failure!: LIBDBI fixture -> Test select cases -> test_retrieve_zero_rows -> [-1] should not match [-1] at [test_dbi_misc.c] line [12] Failure!: LIBDBI fixture -> Test select cases -> test_retrieve_zero_rows -> [-1] should match [0] at [test_dbi_misc.c] line [13] Running "libdbi tests"... I tend to believe that this is a libdbi bug. I've tried test_dbi.c which returns 26 rows instead of zero with at least the mysql and sqlite3 drivers. I've never noticed this problem before. This actually shows how valuable the cgreen framework is going to be for us! In any case, I'll investigate if the library indeed has a problem here. I'll check the other drivers as soon as time permits. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel