cvs: pecl /paradox/tests 001.phpt 002.phpt 003.phpt 004.phpt

From: Date: Mon, 22 Sep 2003 13:34:33 +0000
Subject: cvs: pecl /paradox/tests 001.phpt 002.phpt 003.phpt 004.phpt
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-472@lists.php.net to get a copy of this message
steinm Mon Sep 22 09:34:33 2003 EDT Added files: /pecl/paradox/tests 001.phpt 002.phpt 003.phpt 004.phpt Log: - added tests to create paradox database files Index: pecl/paradox/tests/001.phpt +++ pecl/paradox/tests/001.phpt --TEST-- Check for paradox presence --SKIPIF-- <?php if (!extension_loaded("paradox")) print "skip"; ?> --POST-- --GET-- --INI-- --FILE-- <?php echo "paradox extension is available"; ?> --EXPECT-- paradox extension is available Index: pecl/paradox/tests/002.phpt +++ pecl/paradox/tests/002.phpt --TEST-- Create an new paradox database --SKIPIF-- <?php if (!extension_loaded("paradox")) print "skip"; ?> --POST-- --GET-- --INI-- --FILE-- <?php $dirname = dirname($SCRIPT_FILENAME); $pxdoc = px_new(); $fp = fopen($dirname."/px2.db", "w+"); $fields = array(array("col1", "S"), array("col2", "I")); @px_create_fp($pxdoc, $fp, $fields); px_set_tablename($pxdoc, "testtabelle"); px_close($pxdoc); px_delete($pxdoc); ?> --EXPECT-- Index: pecl/paradox/tests/003.phpt +++ pecl/paradox/tests/003.phpt --TEST-- Create an new paradox with 100 records (Short, Long) --SKIPIF-- <?php if (!extension_loaded("paradox")) print "skip"; ?> --POST-- --GET-- --INI-- --FILE-- <?php $dirname = dirname($SCRIPT_FILENAME); $pxdoc = px_new(); $fp = fopen($dirname."/px3.db", "w+"); $fields = array(array("col1", "S"), array("col2", "I")); @px_create_fp($pxdoc, $fp, $fields); px_set_tablename($pxdoc, "testtabelle"); for($i=-50; $i<50; $i++) { $rec = array($i, -$i); px_put_record($pxdoc, $rec); } px_close($pxdoc); px_delete($pxdoc); ?> --EXPECT-- Index: pecl/paradox/tests/004.phpt +++ pecl/paradox/tests/004.phpt --TEST-- Create an new paradox database with 100 records (Double, Boolean, Alpha) --SKIPIF-- <?php if (!extension_loaded("paradox")) print "skip"; ?> --POST-- --GET-- --INI-- --FILE-- <?php $dirname = dirname($SCRIPT_FILENAME); $pxdoc = px_new(); $fp = fopen($dirname."/px4.db", "w+"); $fields = array(array("col1", "N"), array("col2", "L"), array("col3", "A", 15)); @px_create_fp($pxdoc, $fp, $fields); px_set_tablename($pxdoc, "testtabelle"); for($i=-50; $i<50; $i++) { $rec = array($i*0.001, $i<0, "Nummer $i"); px_put_record($pxdoc, $rec); } px_close($pxdoc); px_delete($pxdoc); ?> --EXPECT--

« previous php.pecl.cvs (#472) next »