summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-01-08 16:55:37 +0000
committerWez Furlong <wez@php.net>2004-01-08 16:55:37 +0000
commitf83b27facec09a5bbe35c968c410434ed29657de (patch)
treef00ce0e7ca1d461c9387a35712ebc768b3cc4f29 /ext
parent17fd860e5e93c11e961fd8f4e875f45660e2ee69 (diff)
downloadphp-git-f83b27facec09a5bbe35c968c410434ed29657de.tar.gz
fix tests for win32
Diffstat (limited to 'ext')
-rw-r--r--ext/sqlite/tests/blankdb.inc9
-rwxr-xr-xext/sqlite/tests/sqlite_oo_029.phpt8
2 files changed, 11 insertions, 6 deletions
diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc
index 1937c515ed..43c6ff3582 100644
--- a/ext/sqlite/tests/blankdb.inc
+++ b/ext/sqlite/tests/blankdb.inc
@@ -1,11 +1,16 @@
<?php #vim:ft=php
$dbname = tempnam(dirname(__FILE__), "phpsql");
function cleanup() {
+ $retry = 10;
+
if (is_resource($GLOBALS['db'])) {
@sqlite_close($GLOBALS['db']);
- usleep(500000);
}
- unlink($GLOBALS['dbname']);
+ do {
+ usleep(500000);
+ if (@unlink($GLOBALS['dbname']))
+ break;
+ } while (file_exists($GLOBALS['dbname']) && --$retry);
}
register_shutdown_function("cleanup");
$db = sqlite_open($dbname);
diff --git a/ext/sqlite/tests/sqlite_oo_029.phpt b/ext/sqlite/tests/sqlite_oo_029.phpt
index f6babeb5b8..23a819295a 100755
--- a/ext/sqlite/tests/sqlite_oo_029.phpt
+++ b/ext/sqlite/tests/sqlite_oo_029.phpt
@@ -1,7 +1,7 @@
--TEST--
sqlite-oo: call method with $this
--FILE--
-<?php
+<?php
include "blankdb_oo.inc";
$db->query("CREATE TABLE strings(key VARCHAR(10), var VARCHAR(10))");
@@ -29,7 +29,7 @@ class sqlite_help
{
unset($this->db);
}
-
+
function __destruct()
{
echo "DESTRUCTED\n";
@@ -37,7 +37,7 @@ class sqlite_help
}
$obj = new sqlite_help($db);
-echo $obj->get_single('foo')."\n";;
+echo $obj->get_single('foo')."\n";
$obj->free();
unset($obj);
@@ -46,4 +46,4 @@ unset($obj);
--EXPECT--
bar
===DONE===
-DESTRUCTED \ No newline at end of file
+DESTRUCTED