php-src/ext/db/tests/005.phpt
Stig Bakken 315f4f5658 @PHP 3 regression testing framework re-born (Stig)
Took the old PHP 3 regression testing framework and rewrote it in PHP.
Should work on both Windows and UNIX, however I have not tested it on
Windows.  See tests/README for how to write tests.  Added the PHP 3
tests and converted most of them.
2000-08-27 19:46:06 +00:00

24 lines
540 B
PHP

--TEST--
DBM FirstKey/NextKey Loop Test With 5 Items
--POST--
--GET--
--FILE--
<?php
dbmopen("./test.dbm","n");
dbminsert("./test.dbm","key1","Content String 1");
dbminsert("./test.dbm","key2","Content String 2");
dbminsert("./test.dbm","key3","Third Content String");
dbminsert("./test.dbm","key4","Another Content String");
dbminsert("./test.dbm","key5","The last content string");
$a = dbmfirstkey("./test.dbm");
$i=0;
while($a) {
$a = dbmnextkey("./test.dbm",$a);
$i++;
}
dbmclose("./test.dbm");
echo $i
?>
--EXPECT--
5