diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-07-15 23:40:00 -0300 |
---|---|---|
committer | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-07-15 23:40:00 -0300 |
commit | cf5f26b260adbcaf0349810724accb1dcc146878 (patch) | |
tree | 5e30433e8b96ffec22e97ec636f72fbfa017c541 | |
parent | 9c2b4985b1401b6e72996eea03fa875ab8321357 (diff) | |
download | php-git-cf5f26b260adbcaf0349810724accb1dcc146878.tar.gz |
Fix failing test upstream
There was a trailing tab when a error message was generated. Removing
it, test is passing now.
-rw-r--r-- | ext/interbase/tests/005.phpt | 80 | ||||
-rw-r--r-- | ext/interbase/tests/interbase.inc | 2 |
2 files changed, 41 insertions, 41 deletions
diff --git a/ext/interbase/tests/005.phpt b/ext/interbase/tests/005.phpt index 8523443078..b460adceaf 100644 --- a/ext/interbase/tests/005.phpt +++ b/ext/interbase/tests/005.phpt @@ -6,7 +6,7 @@ InterBase: transactions <?php require("interbase.inc"); - + ibase_connect($test_base); @ibase_query("create table test5 (i integer)"); @@ -15,7 +15,7 @@ InterBase: transactions echo "default transaction:\n"; - + /* Difference between default and other transactions: default committed when you call ibase_close(). @@ -30,14 +30,14 @@ ibase_blob_create(), ibase_blob_import() first time. /* simple default transaction test without ibase_trans() */ - + ibase_connect($test_base); echo "empty table\n"; /* out_table call ibase_query() and ibase_query() start default transaction */ - out_table("test5"); + out_table("test5"); /* in default transaction context */ ibase_query("insert into test5 (i) values (1)"); @@ -49,13 +49,13 @@ simple default transaction test without ibase_trans() echo "after rollback table empty again\n"; out_table("test5"); /* started new default transaction */ - + ibase_query("insert into test5 (i) values (2)"); ibase_close(); /* commit here! */ - + ibase_connect($test_base); - + echo "one row\n"; out_table("test5"); ibase_close(); @@ -66,14 +66,14 @@ First open transaction on link will be default. $tr_def_l1 may be omitted. All queryes without link and trans parameters run in this context */ - + $link_def = ibase_connect($test_base); - + $tr_def_l1 = ibase_trans(IBASE_READ); /* here transaction start */ - + /* all default */ $res = ibase_query("select * from test5"); - + echo "one row\n"; out_result($res,"test5"); @@ -81,15 +81,15 @@ parameters run in this context /* specify transaction context... */ $res = ibase_query($tr_def_l1, "select * from test5"); - + echo "one row... again.\n"; out_result($res,"test5"); ibase_free_result($res); - + /* specify default transaction on link */ $res = ibase_query($link_def, "select * from test5"); - + echo "one row.\n"; out_result($res,"test5"); @@ -98,14 +98,14 @@ parameters run in this context ibase_rollback($link_def); /* just for example */ ibase_close(); - + /* three transaction on default link */ ibase_connect($test_base); - + $res = ibase_query("select * from test5"); - + echo "one row\n"; out_result($res,"test5"); @@ -113,38 +113,38 @@ three transaction on default link $tr_1 = ibase_query("SET TRANSACTION"); $tr_2 = ibase_query("SET TRANSACTION READ ONLY"); - $tr_3 = ibase_trans(IBASE_READ+IBASE_COMMITTED+IBASE_REC_VERSION+IBASE_WAIT); - $tr_4 = ibase_trans(IBASE_READ+IBASE_COMMITTED+IBASE_REC_NO_VERSION+IBASE_NOWAIT); - + $tr_3 = ibase_trans(IBASE_READ+IBASE_COMMITTED+IBASE_REC_VERSION+IBASE_WAIT); + $tr_4 = ibase_trans(IBASE_READ+IBASE_COMMITTED+IBASE_REC_NO_VERSION+IBASE_NOWAIT); + /* insert in first transaction context... */ /* as default */ ibase_query("insert into test5 (i) values (3)"); /* specify context */ ibase_query($tr_1, "insert into test5 (i) values (4)"); - + $res = ibase_query("select * from test5"); - + echo "two rows\n"; out_result($res,"test5"); ibase_free_result($res); - + $res = ibase_query($tr_1, "select * from test5"); - + echo "two rows again\n"; out_result($res,"test5"); ibase_free_result($res); - + ibase_commit(); ibase_commit($tr_1); $tr_1 = ibase_trans(); ibase_query($tr_1, "insert into test5 (i) values (5)"); - + /* tr_2 is IBASE_READ + IBASE_CONCURRENCY + IBASE_WAIT */ $res = ibase_query($tr_2, "select * from test5"); - + echo "one row in second transaction\n"; out_result($res,"test5"); @@ -152,7 +152,7 @@ three transaction on default link /* tr_3 is IBASE_COMMITTED + IBASE_REC_VERSION + IBASE_WAIT */ $res = ibase_query($tr_3, "select * from test5"); - + echo "three rows in third transaction\n"; out_result($res,"test5"); @@ -160,12 +160,12 @@ three transaction on default link /* tr_4 IBASE_COMMITTED + IBASE_REC_NO_VERSION + IBASE_NOWAIT */ $res = ibase_query($tr_4, "select * from test5"); - + echo "three rows in fourth transaction with deadlock\n"; out_result_trap_error($res,"test5"); - ibase_free_result($res); - + ibase_free_result($res); + ibase_rollback($tr_1); ibase_close(); /* @@ -173,35 +173,35 @@ transactions on second link */ $link_1 = ibase_pconnect($test_base); $link_2 = ibase_pconnect($test_base); - + $tr_1 = ibase_trans(IBASE_DEFAULT, $link_2); /* this default transaction also */ $tr_2 = ibase_trans(IBASE_COMMITTED, $link_2); - + $res = ibase_query($tr_1, "select * from test5"); - + echo "three rows\n"; out_result($res,"test5"); ibase_free_result($res); ibase_query($tr_1, "insert into test5 (i) values (5)"); - + $res = ibase_query($tr_1, "select * from test5"); - + echo "four rows\n"; out_result($res,"test5"); ibase_free_result($res); - + ibase_commit($tr_1); - + $res = ibase_query($tr_2, "select * from test5"); - + echo "four rows again\n"; out_result($res,"test5"); ibase_free_result($res); - + ibase_close($link_1); ibase_close($link_2); diff --git a/ext/interbase/tests/interbase.inc b/ext/interbase/tests/interbase.inc index 41123e68bd..eb762b5d90 100644 --- a/ext/interbase/tests/interbase.inc +++ b/ext/interbase/tests/interbase.inc @@ -62,7 +62,7 @@ function out_result_trap_error($result, $table_name = "") while ($r = @ibase_fetch_row($result)) { echo join("\t",$r)."\t\n"; } - echo "errmsg [" . ibase_errmsg() . "]\t\n"; + echo "errmsg [" . ibase_errmsg() . "]\n"; echo "---\n"; } |