Annotation of embedaddon/php/ext/dba/tests/dba_db4_009.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: DBA DB4 Multiple File Creation Test
                      3: --SKIPIF--
                      4: <?php 
                      5: $handler = "db4";
                      6: require_once(dirname(__FILE__) .'/skipif.inc');
                      7: die("info $HND handler used");
                      8: ?>
                      9: --FILE--
                     10: <?php
                     11: $handler = "db4";
                     12: require_once(dirname(__FILE__) .'/test.inc');
                     13: echo "database handler: $handler\n";
                     14: $db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm'; 
                     15: $db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm'; 
                     16: if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
                     17:     echo "database file created\n";
                     18: } else {
                     19:     echo "$db_file does not exist\n";
                     20: }
                     21: if (($db_file1=dba_open($db_file1, "n", $handler))!==FALSE) {
                     22:     echo "database file created\n";
                     23: } else {
                     24:     echo "$db_file does not exist\n";
                     25: }
                     26: if (($db_file2=dba_open($db_file2, "n", $handler))!==FALSE) {
                     27:     echo "database file created\n";
                     28: } else {
                     29:     echo "$db_file does not exist\n";
                     30: }
                     31: var_dump(dba_list());
                     32: dba_close($db_file);
                     33: 
                     34: @unlink($db_filename1);
                     35: @unlink($db_filename2);
                     36: ?>
                     37: --CLEAN--
                     38: <?php 
                     39: require(dirname(__FILE__) .'/clean.inc'); 
                     40: ?>
                     41: --EXPECTF--
                     42: database handler: db4
                     43: database file created
                     44: database file created
                     45: database file created
                     46: array(3) {
                     47:   [%d]=>
                     48:   string(%d) "%stest0.dbm"
                     49:   [%d]=>
                     50:   string(%d) "%stest1.dbm"
                     51:   [%d]=>
                     52:   string(%d) "%stest2.dbm"
                     53: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>