From: Ulf Wendel Date: Wed, 10 Oct 2007 09:53:34 +0000 (+0000) Subject: Next set of new tests - more to follow. Trying to find reasonable commit size... X-Git-Tag: RELEASE_1_3_1~884 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f01e360850b952ad94f984531db482c8bf429426;p=php Next set of new tests - more to follow. Trying to find reasonable commit size... --- diff --git a/ext/mysql/tests/mysql_data_seek.phpt b/ext/mysql/tests/mysql_data_seek.phpt new file mode 100644 index 0000000000..21ebad692b --- /dev/null +++ b/ext/mysql/tests/mysql_data_seek.phpt @@ -0,0 +1,70 @@ +--TEST-- +mysql_data_seek() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: mysql_data_seek(): Offset 4 is invalid for MySQL result index %d (or the query data is unbuffered) in %s on line %d + +Warning: mysql_data_seek(): Offset -1 is invalid for MySQL result index %d (or the query data is unbuffered) in %s on line %d + +Warning: mysql_data_seek(): Offset 3 is invalid for MySQL result index %d (or the query data is unbuffered) in %s on line %d + +Warning: mysql_data_seek(): %d is not a valid MySQL result resource in %s on line %d +done! \ No newline at end of file diff --git a/ext/mysql/tests/mysql_db_name.phpt b/ext/mysql/tests/mysql_db_name.phpt new file mode 100644 index 0000000000..8e81c76e95 --- /dev/null +++ b/ext/mysql/tests/mysql_db_name.phpt @@ -0,0 +1,63 @@ +--TEST-- +mysql_db_name() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: mysql_db_name(): Unable to jump to row -1 on MySQL result index %d in %s on line %d + +Warning: mysql_db_name(): Unable to jump to row %d on MySQL result index %d in %s on line %d + +Warning: mysql_db_name(): %d is not a valid MySQL result resource in %s on line %d +done! \ No newline at end of file diff --git a/ext/mysql/tests/mysql_db_query.phpt b/ext/mysql/tests/mysql_db_query.phpt new file mode 100644 index 0000000000..421e9f592d --- /dev/null +++ b/ext/mysql/tests/mysql_db_query.phpt @@ -0,0 +1,58 @@ +--TEST-- +mysql_db_query() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +done! \ No newline at end of file diff --git a/ext/mysql/tests/mysql_drop_db.phpt b/ext/mysql/tests/mysql_drop_db.phpt new file mode 100644 index 0000000000..fb42f7b22e --- /dev/null +++ b/ext/mysql/tests/mysql_drop_db.phpt @@ -0,0 +1,43 @@ +--TEST-- +mysql_drop_db() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +done! \ No newline at end of file diff --git a/ext/mysql/tests/mysql_get_client_info.phpt b/ext/mysql/tests/mysql_get_client_info.phpt new file mode 100644 index 0000000000..2f8c62c916 --- /dev/null +++ b/ext/mysql/tests/mysql_get_client_info.phpt @@ -0,0 +1,23 @@ +--TEST-- +mysql_get_client_info() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +done! \ No newline at end of file diff --git a/ext/mysql/tests/mysql_get_host_info.phpt b/ext/mysql/tests/mysql_get_host_info.phpt new file mode 100644 index 0000000000..213a792fd8 --- /dev/null +++ b/ext/mysql/tests/mysql_get_host_info.phpt @@ -0,0 +1,40 @@ +--TEST-- +mysql_get_host_info() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +done! \ No newline at end of file diff --git a/ext/mysql/tests/mysql_get_proto_info.phpt b/ext/mysql/tests/mysql_get_proto_info.phpt new file mode 100644 index 0000000000..989141a47f --- /dev/null +++ b/ext/mysql/tests/mysql_get_proto_info.phpt @@ -0,0 +1,30 @@ +--TEST-- +mysql_get_proto_info() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +done! diff --git a/ext/mysql/tests/mysql_get_server_info.phpt b/ext/mysql/tests/mysql_get_server_info.phpt new file mode 100644 index 0000000000..b759f47f69 --- /dev/null +++ b/ext/mysql/tests/mysql_get_server_info.phpt @@ -0,0 +1,39 @@ +--TEST-- +mysql_get_server_info() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +done! diff --git a/ext/mysql/tests/mysql_info.phpt b/ext/mysql/tests/mysql_info.phpt new file mode 100644 index 0000000000..6cb058f181 --- /dev/null +++ b/ext/mysql/tests/mysql_info.phpt @@ -0,0 +1,69 @@ +--TEST-- +mysql_info() +--SKIPIF-- + +--FILE-- += 100', $link)) + printf("[011] [%d] %s\n", mysql_errno($link), mysql_error($link)); + +if (!is_string($tmp = mysql_info($link)) || ('' == $tmp)) + printf("[012] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); + +if (ini_get('unicode.semantics') && !is_unicode($tmp)) { + printf("[013] Expecting Unicode!\n"); + var_inspect($info); +} + +if (!is_string($def_tmp = mysql_info()) || ('' == $def_tmp)) + printf("[014] Expecting string/any_non_empty, got %s/%s\n", gettype($def_tmp), $def_tmp); + +if ($def_tmp !== $tmp) { + printf("[015] Results differ for default link and specified link, [%d] %s\n", + mysql_errno(), mysql_error()); + var_inspect($tmp); + var_inspect($def_tmp); +} + +// NOTE: no LOAD DATA INFILE test + +print "done!"; +?> +--EXPECTF-- +done! \ No newline at end of file diff --git a/ext/mysql/tests/mysql_insert_id.phpt b/ext/mysql/tests/mysql_insert_id.phpt new file mode 100644 index 0000000000..29ac78f243 --- /dev/null +++ b/ext/mysql/tests/mysql_insert_id.phpt @@ -0,0 +1,66 @@ +--TEST-- +mysql_insert_id() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: mysql_insert_id(): %d is not a valid MySQL-Link resource in %s on line %d +bool(false) +done! \ No newline at end of file