From: Ulf Wendel Date: Thu, 12 Jul 2007 20:38:26 +0000 (+0000) Subject: The usual tweaking: X-Git-Tag: BEFORE_IMPORT_OF_MYSQLND~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=472e0c78d1e16fe5b4df0ab29e82e84815c89c10;p=php The usual tweaking: - take connection parameter from connect.inc - use proper UEXPECTF - have 'print "done!"' or similar at the end to detect crashes - whitespace changes where needed - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0 --- diff --git a/ext/mysqli/tests/005.phpt b/ext/mysqli/tests/005.phpt index afe43a778e..9ba085abca 100644 --- a/ext/mysqli/tests/005.phpt +++ b/ext/mysqli/tests/005.phpt @@ -7,12 +7,13 @@ mysqli fetch char/text long include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd); + $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); - mysqli_select_db($link, "test"); - - mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); - mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)"); + if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch")) + printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + + if (!mysqli_query($link, "CREATE TABLE test_bind_fetch(c1 char(10), c2 text) ENGINE=" . $engine)) + printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); $a = str_repeat("A1", 32000); @@ -30,11 +31,21 @@ mysqli fetch char/text long mysqli_stmt_close($stmt); mysqli_close($link); + print "done!"; ?> --EXPECTF-- array(2) { [0]=> - %s(10) "1234567890" + string(10) "1234567890" + [1]=> + string(13) "32K String ok" +} +done! +--UEXPECTF-- +array(2) { + [0]=> + unicode(10) "1234567890" [1]=> - %s(13) "32K String ok" + unicode(13) "32K String ok" } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/006.phpt b/ext/mysqli/tests/006.phpt index a53ad7a547..d63a6fa41a 100644 --- a/ext/mysqli/tests/006.phpt +++ b/ext/mysqli/tests/006.phpt @@ -5,23 +5,28 @@ mysqli fetch long values --FILE-- --EXPECT-- array(7) { @@ -52,3 +58,4 @@ array(7) { [6]=> int(0) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/007.phpt b/ext/mysqli/tests/007.phpt index cb32033cca..fa1bab92ed 100644 --- a/ext/mysqli/tests/007.phpt +++ b/ext/mysqli/tests/007.phpt @@ -5,23 +5,28 @@ mysqli fetch short values --FILE-- --EXPECT-- array(7) { @@ -52,3 +58,4 @@ array(7) { [6]=> int(0) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/008.phpt b/ext/mysqli/tests/008.phpt index 9fc01b8adf..c2627befcc 100644 --- a/ext/mysqli/tests/008.phpt +++ b/ext/mysqli/tests/008.phpt @@ -5,23 +5,28 @@ mysqli fetch tinyint values --FILE-- --EXPECT-- array(7) { @@ -52,3 +58,4 @@ array(7) { [6]=> int(0) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/009.phpt b/ext/mysqli/tests/009.phpt index ae35d97fc2..a7b285f3ef 100644 --- a/ext/mysqli/tests/009.phpt +++ b/ext/mysqli/tests/009.phpt @@ -11,39 +11,56 @@ mysqli fetch bigint values (ok to fail with 4.1.x) --FILE-- --EXPECTF-- @@ -67,7 +83,27 @@ array(7) { [2]=> int(4) [3]=> - %s(14) "33333333333333" + string(14) "33333333333333" + [4]=> + int(0) + [5]=> + int(0) + [6]=> + int(100) +} +20123456 +3123456789 +done! +--UEXPECTF-- +array(7) { + [0]=> + int(5) + [1]=> + int(-23) + [2]=> + int(4) + [3]=> + unicode(14) "33333333333333" [4]=> int(0) [5]=> @@ -77,3 +113,4 @@ array(7) { } 20123456 3123456789 +done! \ No newline at end of file