From 1cef1c528d1efcaf0925f4627f1140f89b04e9f8 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Thu, 12 Jul 2007 20:49:29 +0000 Subject: [PATCH] I forgot to mention: some will fail. In particular in unicode mode. Next 10 in row to be tweaked: - 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 - understand return value checking as sometime that makes you type more when you write but makes you happy when you debug --- ext/mysqli/tests/020.phpt | 32 +++++++++++++++++++------------- ext/mysqli/tests/021.phpt | 24 +++++++++++++++++------- ext/mysqli/tests/022.phpt | 25 ++++++++++++++++++------- ext/mysqli/tests/023.phpt | 13 ++++++++----- ext/mysqli/tests/024.phpt | 12 +++++++----- ext/mysqli/tests/025.phpt | 13 ++++++++----- ext/mysqli/tests/026.phpt | 25 +++++++++++++++++-------- ext/mysqli/tests/027.phpt | 6 ++++-- ext/mysqli/tests/028.phpt | 11 ++++++++--- ext/mysqli/tests/029.phpt | 8 +++++--- 10 files changed, 111 insertions(+), 58 deletions(-) diff --git a/ext/mysqli/tests/020.phpt b/ext/mysqli/tests/020.phpt index 17dc981b50..65ac2a0e16 100644 --- a/ext/mysqli/tests/020.phpt +++ b/ext/mysqli/tests/020.phpt @@ -4,27 +4,30 @@ mysqli bind_param/bind_result date --FILE-- --EXPECTF-- array(7) { @@ -66,3 +71,4 @@ array(7) { [6]=> %s(19) "1999-12-29 00:00:00" } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/021.phpt b/ext/mysqli/tests/021.phpt index e351bd4540..b9f367afda 100644 --- a/ext/mysqli/tests/021.phpt +++ b/ext/mysqli/tests/021.phpt @@ -1,18 +1,18 @@ --TEST-- -mysqli bind_param+bind_result char/text +mysqli bind_param+bind_result char/text --SKIPIF-- --FILE-- --EXPECTF-- array(2) { [0]=> - %s(10) "1234567890" + string(10) "1234567890" + [1]=> + %s(14) "this is a test" +} +done! +--UEXPECTF-- +array(2) { + [0]=> + unicode(10) "1234567890" [1]=> %s(14) "this is a test" } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/022.phpt b/ext/mysqli/tests/022.phpt index a716d848fd..969936ed8a 100644 --- a/ext/mysqli/tests/022.phpt +++ b/ext/mysqli/tests/022.phpt @@ -1,18 +1,18 @@ --TEST-- -mysqli bind_param/bind_result char/text long +mysqli bind_param/bind_result char/text long --SKIPIF-- --FILE-- --EXPECTF-- array(2) { [0]=> - %s(10) "1234567890" + string(10) "1234567890" + [1]=> + %s(13) "32K String ok" +} +done! +--UEXPECTF-- +array(2) { + [0]=> + unicode(10) "1234567890" [1]=> %s(13) "32K String ok" } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/023.phpt b/ext/mysqli/tests/023.phpt index 24a717a6eb..97398001f8 100644 --- a/ext/mysqli/tests/023.phpt +++ b/ext/mysqli/tests/023.phpt @@ -5,15 +5,15 @@ mysqli bind_param/bind_prepare fetch long values --FILE-- --EXPECT-- array(7) { @@ -63,3 +65,4 @@ array(7) { [6]=> int(0) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/024.phpt b/ext/mysqli/tests/024.phpt index f0d0a6407a..58302b39d4 100644 --- a/ext/mysqli/tests/024.phpt +++ b/ext/mysqli/tests/024.phpt @@ -5,15 +5,15 @@ mysqli bind_param/bind_result short values --FILE-- --EXPECT-- array(7) { @@ -64,3 +65,4 @@ array(7) { [6]=> int(0) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/025.phpt b/ext/mysqli/tests/025.phpt index f3338cf467..8d3e2388e1 100644 --- a/ext/mysqli/tests/025.phpt +++ b/ext/mysqli/tests/025.phpt @@ -5,15 +5,15 @@ mysqli bind_param/bind_result tinyint values --FILE-- --EXPECT-- array(7) { @@ -68,3 +70,4 @@ array(7) { [6]=> int(0) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/026.phpt b/ext/mysqli/tests/026.phpt index ad4fe67b84..04faf108c6 100644 --- a/ext/mysqli/tests/026.phpt +++ b/ext/mysqli/tests/026.phpt @@ -1,19 +1,19 @@ --TEST-- -mysqli bind_param/bind_result with send_long_data +mysqli bind_param/bind_result with send_long_data --SKIPIF-- --FILE-- + print "done!"; --EXPECTF-- array(2) { [0]=> - %s(10) "Hello Worl" + string(10) "Hello Worl" + [1]=> + string(99) "This is the first sentence. And this is the second sentence. And finally this is the last sentence." +} +done! +--UEXPECTF-- +array(2) { + [0]=> + unicode(10) "Hello Worl" [1]=> %s(99) "This is the first sentence. And this is the second sentence. And finally this is the last sentence." } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/027.phpt b/ext/mysqli/tests/027.phpt index 9f8eadf9dd..dc0f1af928 100644 --- a/ext/mysqli/tests/027.phpt +++ b/ext/mysqli/tests/027.phpt @@ -5,9 +5,9 @@ function test: mysqli_stat --FILE-- 0); mysqli_close($link); + print "done!"; ?> --EXPECT-- bool(true) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/028.phpt b/ext/mysqli/tests/028.phpt index b11da2ae44..44704dcae0 100644 --- a/ext/mysqli/tests/028.phpt +++ b/ext/mysqli/tests/028.phpt @@ -5,15 +5,20 @@ function test: mysqli_character_set_name --FILE-- --EXPECTF-- -%s(%d) "%s" +string(%d) "%s" +done! +--UEXPECTF-- +unicode(%d) "%s" +done! \ No newline at end of file diff --git a/ext/mysqli/tests/029.phpt b/ext/mysqli/tests/029.phpt index 318e6aeb9e..4970736f2a 100644 --- a/ext/mysqli/tests/029.phpt +++ b/ext/mysqli/tests/029.phpt @@ -5,11 +5,11 @@ function test: mysqli_affected_rows --FILE-- --EXPECT-- int(3) +done! \ No newline at end of file -- 2.50.1