]> granicus.if.org Git - php/commitdiff
Always show handler used
authorMarcus Boerger <helly@php.net>
Fri, 1 Nov 2002 14:21:36 +0000 (14:21 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 1 Nov 2002 14:21:36 +0000 (14:21 +0000)
ext/dba/tests/dba001.phpt
ext/dba/tests/dba002.phpt
ext/dba/tests/dba003.phpt
ext/dba/tests/dba004.phpt
ext/dba/tests/dba005.phpt
ext/dba/tests/dba006.phpt
ext/dba/tests/dba007.phpt

index 909f78214da957f0d5acc4cc4cd1d09d13cab2df..68d337337610ca1df4f36995e50fa94f6d329159 100644 (file)
@@ -7,12 +7,14 @@ DBA File Creation Test
 --FILE--
 <?php
        require_once('test.inc');
+       echo "database handler: $handler\n";
        if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
-       echo "database file created with $handler.\n";
+       echo "database file created\n";
+               dba_close($db_file);
        } else {
        echo "$db_file does not exist\n";
     }
-       dba_close($db_file);
 ?>
 --EXPECTF--
-database file created with %s.
\ No newline at end of file
+database handler: %s
+database file created
\ No newline at end of file
index d2fd7d012c42cd2e2a6002e83e905aa180ee0cb2..d4e4eb1710052f08110949eebacd9b4afa939a6f 100644 (file)
@@ -7,6 +7,7 @@ DBA Insert/Fetch Test
 --FILE--
 <?php
        require_once('test.inc');
+       echo "database handler: $handler\n";
        if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
                dba_insert("key1", "This is a test insert", $db_file);
                echo dba_fetch("key1", $db_file);
@@ -15,5 +16,6 @@ DBA Insert/Fetch Test
                echo "Error creating database\n";
        }
 ?>
---EXPECT--
+--EXPECTF--
+database handler: %s
 This is a test insert
index 64225a83296eb354ed79e6355d17045c9c9ea85d..5fdc622c1bc2c82708f9699bf16c1b8ae7505387 100644 (file)
@@ -7,6 +7,7 @@ DBA Insert/Replace/Fetch Test
 --FILE--
 <?php
        require_once('test.inc');
+       echo "database handler: $handler\n";
        if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
                dba_insert("key1", "This is a test insert", $db_file);
                dba_replace("key1", "This is the replacement text", $db_file);
@@ -17,5 +18,6 @@ DBA Insert/Replace/Fetch Test
                echo "Error creating database\n";
        }
 ?>
---EXPECT--
+--EXPECTF--
+database handler: %s
 This is the replacement text
index 9259a78d57972a14518132fe0c340070c7f358c0..5403ae003309d24f3e117a69c4b90f502953eeb9 100644 (file)
@@ -7,6 +7,7 @@ DBA Multiple Insert/Fetch Test
 --FILE--
 <?php
        require_once('test.inc');
+       echo "database handler: $handler\n";
        if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
                dba_insert("key1", "Content String 1", $db_file);
                dba_insert("key2", "Content String 2", $db_file);
@@ -21,5 +22,6 @@ DBA Multiple Insert/Fetch Test
                echo "Error creating database\n";
        }
 ?>
---EXPECT--
+--EXPECTF--
+database handler: %s
 Another Content String Content String 2
index 98b1d9e7e9653c67e5504d9c0f7d66983dc3959c..d2b958ca61dc5f8fa6e5269a5a5861a01f74f60c 100644 (file)
@@ -7,6 +7,7 @@ DBA FirstKey/NextKey Loop Test With 5 Items
 --FILE--
 <?php
        require_once('test.inc');
+       echo "database handler: $handler\n";
        if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
                dba_insert("key1", "Content String 1", $db_file);
                dba_insert("key2", "Content String 2", $db_file);
@@ -28,5 +29,6 @@ DBA FirstKey/NextKey Loop Test With 5 Items
                echo "Error creating database\n";
        }
 ?>
---EXPECT--
+--EXPECTF--
+database handler: %s
 5YYYYY
index 5d9882a1b00399dacef31a83b48899ff120b5d23..a572a70f3b486c2bf3fb11cd622aeb063c49a357 100644 (file)
@@ -7,6 +7,7 @@ DBA FirstKey/NextKey with 2 deletes
 --FILE--
 <?php
        require_once('test.inc');
+       echo "database handler: $handler\n";
        if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
                dba_insert("key1", "Content String 1", $db_file);
                dba_insert("key2", "Content String 2", $db_file);
@@ -30,5 +31,6 @@ DBA FirstKey/NextKey with 2 deletes
                echo "Error creating database\n";
        }
 ?>
---EXPECT--
+--EXPECTF--
+database handler: %s
 3NYNYY
\ No newline at end of file
index 82316cfd01236baabe5ac474267889b866d4e8a1..65509bc2400a8cc1068f6251a864409262ea068f 100644 (file)
@@ -8,20 +8,21 @@ DBA Multiple File Creation Test
 --FILE--
 <?php
        require_once('test.inc');
+       echo "database handler: $handler\n";
        $db_file1 = dirname(__FILE__).'/test1.dbm'; 
        $db_file2 = dirname(__FILE__).'/test2.dbm'; 
        if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
-       echo "database file created with $handler.\n";
+       echo "database file created\n";
        } else {
        echo "$db_file does not exist\n";
     }
        if (($db_file1=dba_open($db_file1, "n", $handler))!==FALSE) {
-       echo "database file created with $handler.\n";
+       echo "database file created\n";
        } else {
        echo "$db_file does not exist\n";
     }
        if (($db_file2=dba_open($db_file2, "n", $handler))!==FALSE) {
-       echo "database file created with $handler.\n";
+       echo "database file created\n";
        } else {
        echo "$db_file does not exist\n";
     }
@@ -29,10 +30,13 @@ DBA Multiple File Creation Test
        dba_close($db_file);
 ?>
 --EXPECTF--
-database file created with %s.
+database handler: %s
+database file created
+database file created
+database file created
 array(3) {
   [%d]=>
-  string(%d) "%sext/dba/tests/test.dbm"
+  string(%d) "%sext/dba/tests/test0.dbm"
   [%d]=>
   string(%d) "%sext/dba/tests/test1.dbm"
   [%d]=>