From: Marcus Boerger Date: Tue, 20 May 2003 00:14:46 +0000 (+0000) Subject: Reorganized tests X-Git-Tag: RELEASE_1_0_2~712 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=daded6e633a57a499a11fb97e417d063cc803058;p=php Reorganized tests --- diff --git a/ext/pgsql/tests/01createdb.phpt b/ext/pgsql/tests/01createdb.phpt index 3b34ed537e..15849396c6 100644 --- a/ext/pgsql/tests/01createdb.phpt +++ b/ext/pgsql/tests/01createdb.phpt @@ -4,7 +4,25 @@ PostgreSQL create db --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/02connection.phpt b/ext/pgsql/tests/02connection.phpt index fd1333dfe6..f1258f6df1 100644 --- a/ext/pgsql/tests/02connection.phpt +++ b/ext/pgsql/tests/02connection.phpt @@ -4,7 +4,47 @@ PostgreSQL connection --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/03sync_query.phpt b/ext/pgsql/tests/03sync_query.phpt index 0f2e048959..c65426d7d8 100644 --- a/ext/pgsql/tests/03sync_query.phpt +++ b/ext/pgsql/tests/03sync_query.phpt @@ -4,7 +4,50 @@ PostgreSQL sync query --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/04async_query.phpt b/ext/pgsql/tests/04async_query.phpt index a3d17699b9..15728ec1ee 100644 --- a/ext/pgsql/tests/04async_query.phpt +++ b/ext/pgsql/tests/04async_query.phpt @@ -4,7 +4,62 @@ PostgreSQL async query --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/05large_object.phpt b/ext/pgsql/tests/05large_object.phpt index ef0bc15db9..4f8683625a 100644 --- a/ext/pgsql/tests/05large_object.phpt +++ b/ext/pgsql/tests/05large_object.phpt @@ -4,7 +4,70 @@ PostgreSQL large object --FILE-- --EXPECT-- large object data diff --git a/ext/pgsql/tests/06copy.phpt b/ext/pgsql/tests/06copy.phpt index dbbe1ff4d6..e5823c43a5 100644 --- a/ext/pgsql/tests/06copy.phpt +++ b/ext/pgsql/tests/06copy.phpt @@ -4,7 +4,12 @@ PostgreSQL copy functions --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/07optional.phpt b/ext/pgsql/tests/07optional.phpt index f8b8cbeec7..e73a9cffe0 100644 --- a/ext/pgsql/tests/07optional.phpt +++ b/ext/pgsql/tests/07optional.phpt @@ -4,7 +4,16 @@ PostgreSQL optional functions --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/08escape.phpt b/ext/pgsql/tests/08escape.phpt index e6a8cf8731..aa24a4512e 100644 --- a/ext/pgsql/tests/08escape.phpt +++ b/ext/pgsql/tests/08escape.phpt @@ -4,7 +4,63 @@ PostgreSQL escape functions --FILE-- --EXPECT-- pg_escape_string() is NOT Ok diff --git a/ext/pgsql/tests/09notice.phpt b/ext/pgsql/tests/09notice.phpt index f50bc70702..ef56b8dadc 100644 --- a/ext/pgsql/tests/09notice.phpt +++ b/ext/pgsql/tests/09notice.phpt @@ -4,7 +4,22 @@ PostgreSQL notice function --FILE-- --EXPECT-- NOTICE: BEGIN: already a transaction in progress diff --git a/ext/pgsql/tests/10pg_convert.phpt b/ext/pgsql/tests/10pg_convert.phpt index 016c7e74d5..b88b8e5798 100644 --- a/ext/pgsql/tests/10pg_convert.phpt +++ b/ext/pgsql/tests/10pg_convert.phpt @@ -4,7 +4,16 @@ PostgreSQL pg_convert() --FILE-- '1234', 'str'=>'AAA', 'bin'=>'BBB'); +$converted = pg_convert($db, $table_name, $fields); + +var_dump($converted); ?> --EXPECT-- array(3) { diff --git a/ext/pgsql/tests/11pg_meta_data.phpt b/ext/pgsql/tests/11pg_meta_data.phpt index 85e2d2cf07..5726bb3128 100644 --- a/ext/pgsql/tests/11pg_meta_data.phpt +++ b/ext/pgsql/tests/11pg_meta_data.phpt @@ -4,7 +4,15 @@ PostgreSQL pg_metadata() --FILE-- --EXPECT-- array(3) { diff --git a/ext/pgsql/tests/12pg_insert.phpt b/ext/pgsql/tests/12pg_insert.phpt index 104b6fe662..8d98f220fd 100644 --- a/ext/pgsql/tests/12pg_insert.phpt +++ b/ext/pgsql/tests/12pg_insert.phpt @@ -4,7 +4,17 @@ PostgreSQL pg_insert() --FILE-- '1234', 'str'=>'AAA', 'bin'=>'BBB'); + +pg_insert($db, $table_name, $fields) or print "Error in test 1\n"; +echo pg_insert($db, $table_name, $fields, PGSQL_DML_STRING)."\n"; + +echo "Ok\n"; ?> --EXPECT-- INSERT INTO php_pgsql_test (num,str,bin) VALUES (1234,'AAA','BBB'); diff --git a/ext/pgsql/tests/13pg_select.phpt b/ext/pgsql/tests/13pg_select.phpt index 43c94c037f..55e88db731 100644 --- a/ext/pgsql/tests/13pg_select.phpt +++ b/ext/pgsql/tests/13pg_select.phpt @@ -4,7 +4,19 @@ PostgreSQL pg_select() --FILE-- '1234', 'str'=>'ABC', 'bin'=>'XYZ'); +$ids = array('num'=>'1234'); + +$res = pg_select($db, $table_name, $ids) or print "Error\n"; +var_dump($res); +echo pg_select($db, $table_name, $ids, PGSQL_DML_STRING)."\n"; +echo "Ok\n"; + ?> --EXPECT-- array(1) { diff --git a/ext/pgsql/tests/14pg_update.phpt b/ext/pgsql/tests/14pg_update.phpt index 7dd4dd2d95..ef8d7e49bd 100644 --- a/ext/pgsql/tests/14pg_update.phpt +++ b/ext/pgsql/tests/14pg_update.phpt @@ -4,7 +4,18 @@ PostgreSQL pg_update() --FILE-- '1234', 'str'=>'ABC', 'bin'=>'XYZ'); +$ids = array('num'=>'1234'); + +pg_update($db, $table_name, $fields, $ids) or print "Error in test 1\n"; +echo pg_update($db, $table_name, $fields, $ids, PGSQL_DML_STRING)."\n"; + +echo "Ok\n"; ?> --EXPECT-- UPDATE php_pgsql_test SET num=1234,str='ABC',bin='XYZ' WHERE num=1234; diff --git a/ext/pgsql/tests/15pg_delete.phpt b/ext/pgsql/tests/15pg_delete.phpt index 331e898383..e35f4ba78e 100644 --- a/ext/pgsql/tests/15pg_delete.phpt +++ b/ext/pgsql/tests/15pg_delete.phpt @@ -4,7 +4,20 @@ PostgreSQL pg_delete() --FILE-- '1234', 'str'=>'XXX', 'bin'=>'YYY'); +$ids = array('num'=>'1234'); +if (!pg_delete($db, $table_name, $ids)) { + echo "Error\n"; +} +else { + echo "Ok\n"; +} ?> --EXPECT-- Ok diff --git a/ext/pgsql/tests/16pg_result_status.phpt b/ext/pgsql/tests/16pg_result_status.phpt index 6faf849e7f..268dc9fd64 100644 --- a/ext/pgsql/tests/16pg_result_status.phpt +++ b/ext/pgsql/tests/16pg_result_status.phpt @@ -4,7 +4,15 @@ PostgreSQL pg_result_status() --FILE-- --EXPECT-- 1 diff --git a/ext/pgsql/tests/17result.phpt b/ext/pgsql/tests/17result.phpt index e8c3f390de..265d00c657 100644 --- a/ext/pgsql/tests/17result.phpt +++ b/ext/pgsql/tests/17result.phpt @@ -4,10 +4,26 @@ PostgreSQL pg_fetch_*() functions --FILE-- --EXPECT-- -object(stdClass)(3) { +object(stdClass)#1 (3) { ["num"]=> string(1) "1" ["str"]=> @@ -39,7 +55,7 @@ array(3) { } array(3) { ["num"]=> - string(1) "2" + string(1) "1" ["str"]=> string(3) "ABC" ["bin"]=> diff --git a/ext/pgsql/tests/18pg_escape_bytea.phpt b/ext/pgsql/tests/18pg_escape_bytea.phpt index 08832c40da..312c7e2f6b 100644 --- a/ext/pgsql/tests/18pg_escape_bytea.phpt +++ b/ext/pgsql/tests/18pg_escape_bytea.phpt @@ -4,7 +4,26 @@ PostgreSQL pg_escape_bytea() functions --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/19pg_ping.phpt b/ext/pgsql/tests/19pg_ping.phpt index eba678b55e..9059bde470 100644 --- a/ext/pgsql/tests/19pg_ping.phpt +++ b/ext/pgsql/tests/19pg_ping.phpt @@ -4,7 +4,12 @@ PostgreSQL pg_ping() functions --FILE-- --EXPECT-- bool(true) diff --git a/ext/pgsql/tests/20pg_get_pid.phpt b/ext/pgsql/tests/20pg_get_pid.phpt index 9572751185..06cdfa8656 100644 --- a/ext/pgsql/tests/20pg_get_pid.phpt +++ b/ext/pgsql/tests/20pg_get_pid.phpt @@ -4,7 +4,14 @@ PostgreSQL pg_get_pid() functions --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/21pg_get_notify.phpt b/ext/pgsql/tests/21pg_get_notify.phpt index 0ff3a74a26..9171fc01aa 100644 --- a/ext/pgsql/tests/21pg_get_notify.phpt +++ b/ext/pgsql/tests/21pg_get_notify.phpt @@ -4,7 +4,17 @@ PostgreSQL pg_get_notify() functions --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/98old_api.phpt b/ext/pgsql/tests/98old_api.phpt index c6f8070c23..2667e097e3 100644 --- a/ext/pgsql/tests/98old_api.phpt +++ b/ext/pgsql/tests/98old_api.phpt @@ -4,7 +4,30 @@ PostgreSQL old api --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/9999dropdb.phpt b/ext/pgsql/tests/9999dropdb.phpt index d60e2dce99..c60eeda8d6 100644 --- a/ext/pgsql/tests/9999dropdb.phpt +++ b/ext/pgsql/tests/9999dropdb.phpt @@ -4,7 +4,15 @@ PostgreSQL drop db --FILE-- --EXPECT-- OK diff --git a/ext/pgsql/tests/async_query.inc b/ext/pgsql/tests/async_query.inc deleted file mode 100644 index ac70809095..0000000000 --- a/ext/pgsql/tests/async_query.inc +++ /dev/null @@ -1,59 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/connection.inc b/ext/pgsql/tests/connection.inc deleted file mode 100644 index e6e9c143af..0000000000 --- a/ext/pgsql/tests/connection.inc +++ /dev/null @@ -1,44 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/copy.inc b/ext/pgsql/tests/copy.inc deleted file mode 100644 index 52b6e1d748..0000000000 --- a/ext/pgsql/tests/copy.inc +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/createdb.inc b/ext/pgsql/tests/createdb.inc deleted file mode 100644 index b11883800f..0000000000 --- a/ext/pgsql/tests/createdb.inc +++ /dev/null @@ -1,22 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/dropdb.inc b/ext/pgsql/tests/dropdb.inc deleted file mode 100644 index eaf33ae742..0000000000 --- a/ext/pgsql/tests/dropdb.inc +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/escape.inc b/ext/pgsql/tests/escape.inc deleted file mode 100644 index a39e1c1621..0000000000 --- a/ext/pgsql/tests/escape.inc +++ /dev/null @@ -1,59 +0,0 @@ - diff --git a/ext/pgsql/tests/informational.inc b/ext/pgsql/tests/informational.inc deleted file mode 100644 index 120c61335b..0000000000 --- a/ext/pgsql/tests/informational.inc +++ /dev/null @@ -1,47 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/large_object.inc b/ext/pgsql/tests/large_object.inc deleted file mode 100644 index f21912b5b6..0000000000 --- a/ext/pgsql/tests/large_object.inc +++ /dev/null @@ -1,67 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/notice.inc b/ext/pgsql/tests/notice.inc deleted file mode 100644 index 4c2b1de49e..0000000000 --- a/ext/pgsql/tests/notice.inc +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/ext/pgsql/tests/old_api.inc b/ext/pgsql/tests/old_api.inc deleted file mode 100644 index 4995961831..0000000000 --- a/ext/pgsql/tests/old_api.inc +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/optional.inc b/ext/pgsql/tests/optional.inc deleted file mode 100644 index 87dbfd39d3..0000000000 --- a/ext/pgsql/tests/optional.inc +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/pg_convert.inc b/ext/pgsql/tests/pg_convert.inc deleted file mode 100644 index ab6e95ff65..0000000000 --- a/ext/pgsql/tests/pg_convert.inc +++ /dev/null @@ -1,14 +0,0 @@ -'1234', 'str'=>'AAA', 'bin'=>'BBB'); -$converted = pg_convert($db, $table_name, $fields); - -var_dump($converted); - - -?> diff --git a/ext/pgsql/tests/pg_delete.inc b/ext/pgsql/tests/pg_delete.inc deleted file mode 100644 index 33ba80e727..0000000000 --- a/ext/pgsql/tests/pg_delete.inc +++ /dev/null @@ -1,17 +0,0 @@ -'1234', 'str'=>'XXX', 'bin'=>'YYY'); -$ids = array('num'=>'1234'); -if (!pg_delete($db, $table_name, $ids)) { - echo "Error\n"; -} -else { - echo "Ok\n"; -} - -?> \ No newline at end of file diff --git a/ext/pgsql/tests/pg_escape_bytea.inc b/ext/pgsql/tests/pg_escape_bytea.inc deleted file mode 100644 index 249c2f158d..0000000000 --- a/ext/pgsql/tests/pg_escape_bytea.inc +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/pg_get_notify.inc b/ext/pgsql/tests/pg_get_notify.inc deleted file mode 100644 index dfb4fe3b85..0000000000 --- a/ext/pgsql/tests/pg_get_notify.inc +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/pg_get_pid.inc b/ext/pgsql/tests/pg_get_pid.inc deleted file mode 100644 index 5aa8e7efa5..0000000000 --- a/ext/pgsql/tests/pg_get_pid.inc +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/pg_insert.inc b/ext/pgsql/tests/pg_insert.inc deleted file mode 100644 index e0777a215e..0000000000 --- a/ext/pgsql/tests/pg_insert.inc +++ /dev/null @@ -1,13 +0,0 @@ -'1234', 'str'=>'AAA', 'bin'=>'BBB'); - -pg_insert($db, $table_name, $fields) or print "Error in test 1\n"; -echo pg_insert($db, $table_name, $fields, PGSQL_DML_STRING)."\n"; - -echo "Ok\n"; -?> diff --git a/ext/pgsql/tests/pg_meta_data.inc b/ext/pgsql/tests/pg_meta_data.inc deleted file mode 100644 index 4486935838..0000000000 --- a/ext/pgsql/tests/pg_meta_data.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/ext/pgsql/tests/pg_ping.inc b/ext/pgsql/tests/pg_ping.inc deleted file mode 100644 index 2d9be9fadc..0000000000 --- a/ext/pgsql/tests/pg_ping.inc +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/pg_result_status.inc b/ext/pgsql/tests/pg_result_status.inc deleted file mode 100644 index 2c03e8966a..0000000000 --- a/ext/pgsql/tests/pg_result_status.inc +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/pg_select.inc b/ext/pgsql/tests/pg_select.inc deleted file mode 100644 index 4d251bc992..0000000000 --- a/ext/pgsql/tests/pg_select.inc +++ /dev/null @@ -1,15 +0,0 @@ -'1234', 'str'=>'ABC', 'bin'=>'XYZ'); -$ids = array('num'=>'1234'); - -$res = pg_select($db, $table_name, $ids) or print "Error\n"; -var_dump($res); -echo pg_select($db, $table_name, $ids, PGSQL_DML_STRING)."\n"; -echo "Ok\n"; - -?> \ No newline at end of file diff --git a/ext/pgsql/tests/pg_update.inc b/ext/pgsql/tests/pg_update.inc deleted file mode 100644 index 8fc8bb168b..0000000000 --- a/ext/pgsql/tests/pg_update.inc +++ /dev/null @@ -1,15 +0,0 @@ -'1234', 'str'=>'ABC', 'bin'=>'XYZ'); -$ids = array('num'=>'1234'); - -pg_update($db, $table_name, $fields, $ids) or print "Error in test 1\n"; -echo pg_update($db, $table_name, $fields, $ids, PGSQL_DML_STRING)."\n"; - -echo "Ok\n"; - -?> diff --git a/ext/pgsql/tests/result.inc b/ext/pgsql/tests/result.inc deleted file mode 100644 index fb38938b89..0000000000 --- a/ext/pgsql/tests/result.inc +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/ext/pgsql/tests/sync_query.inc b/ext/pgsql/tests/sync_query.inc deleted file mode 100644 index 5a75b2c88c..0000000000 --- a/ext/pgsql/tests/sync_query.inc +++ /dev/null @@ -1,47 +0,0 @@ - \ No newline at end of file