diff options
| author | Wez Furlong <wez@php.net> | 2003-12-05 13:42:04 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2003-12-05 13:42:04 +0000 |
| commit | 98f1021dd85fac47ac37778e955ed42a2a608215 (patch) | |
| tree | 747300aa8bdd836dbe4be78285c34bfe4d73f18d | |
| parent | ab0029cabfabbad38fd44e4037cef3290ab8af87 (diff) | |
| download | php-git-98f1021dd85fac47ac37778e955ed42a2a608215.tar.gz | |
Make these tests work under win32
| -rw-r--r-- | ext/com_dotnet/tests/variants.phpt | 4 | ||||
| -rw-r--r-- | ext/session/tests/skipif.inc | 5 | ||||
| -rw-r--r-- | ext/sqlite/tests/blankdb.inc | 5 | ||||
| -rwxr-xr-x | ext/sqlite/tests/blankdb_oo.inc | 4 | ||||
| -rwxr-xr-x | ext/sqlite/tests/sqlite_001.phpt | 1 | ||||
| -rwxr-xr-x | ext/sqlite/tests/sqlite_015.phpt | 2 | ||||
| -rwxr-xr-x | ext/sqlite/tests/sqlite_017.phpt | 2 | ||||
| -rwxr-xr-x | ext/sqlite/tests/sqlite_oo_020.phpt | 4 | ||||
| -rw-r--r-- | ext/standard/tests/strings/bug24098.phpt | 2 |
9 files changed, 16 insertions, 13 deletions
diff --git a/ext/com_dotnet/tests/variants.phpt b/ext/com_dotnet/tests/variants.phpt index 36258424da..9fb1223a04 100644 --- a/ext/com_dotnet/tests/variants.phpt +++ b/ext/com_dotnet/tests/variants.phpt @@ -2,7 +2,7 @@ COM: General variant tests --SKIPIF-- <?php # vim:ft=php -if (!extension_loaded("com_dotnet")) print "skip"; ?> +if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?> --FILE-- <?php // $Id$ error_reporting(E_ALL); @@ -30,8 +30,6 @@ foreach ($values as $t => $val) { } } } -$a = new VARIANT('10.0', VT_DECIMAL); -var_dump($a); echo "OK!"; ?> diff --git a/ext/session/tests/skipif.inc b/ext/session/tests/skipif.inc index 8336e75bd0..84caea38b4 100644 --- a/ext/session/tests/skipif.inc +++ b/ext/session/tests/skipif.inc @@ -5,6 +5,9 @@ if (!extension_loaded("session") && ini_get("enable_dl")) { @dl("session$dlext"); } if (!extension_loaded("session")) { - die("skip\n"); + die("skip Session module not loaded"); +} +if (!file_exists(ini_get("session.save_path"))) { + die("skip Session save_path doesn't exist"); } ?> diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc index 085d3b2b51..1937c515ed 100644 --- a/ext/sqlite/tests/blankdb.inc +++ b/ext/sqlite/tests/blankdb.inc @@ -1,8 +1,9 @@ <?php #vim:ft=php $dbname = tempnam(dirname(__FILE__), "phpsql"); function cleanup() { - if ($GLOBALS['db']) { - sqlite_close($GLOBALS['db']); + if (is_resource($GLOBALS['db'])) { + @sqlite_close($GLOBALS['db']); + usleep(500000); } unlink($GLOBALS['dbname']); } diff --git a/ext/sqlite/tests/blankdb_oo.inc b/ext/sqlite/tests/blankdb_oo.inc index b98fb41025..04decbe83e 100755 --- a/ext/sqlite/tests/blankdb_oo.inc +++ b/ext/sqlite/tests/blankdb_oo.inc @@ -2,9 +2,9 @@ $dbname = tempnam(dirname(__FILE__), "phpsql"); function cleanup() { global $db, $dbname; - $db = NULL; - unlink($dbname); + usleep(500000); + @unlink($dbname); } register_shutdown_function("cleanup"); $db = new sqlite_db($dbname); diff --git a/ext/sqlite/tests/sqlite_001.phpt b/ext/sqlite/tests/sqlite_001.phpt index 70059a3e59..61d8896570 100755 --- a/ext/sqlite/tests/sqlite_001.phpt +++ b/ext/sqlite/tests/sqlite_001.phpt @@ -9,7 +9,6 @@ sqlite.assoc_case=0 require_once('blankdb.inc'); echo "$db\n"; sqlite_close($db); -$db = NULL; echo "Done\n"; ?> --EXPECTF-- diff --git a/ext/sqlite/tests/sqlite_015.phpt b/ext/sqlite/tests/sqlite_015.phpt index dc3126aab6..8de42a84b9 100755 --- a/ext/sqlite/tests/sqlite_015.phpt +++ b/ext/sqlite/tests/sqlite_015.phpt @@ -24,7 +24,7 @@ foreach ($data as $str) { $res = sqlite_array_query("SELECT a from strings", $db, SQLITE_NUM); var_dump($res); -sqlite_close($db); +$db = null; echo "DONE!\n"; ?> diff --git a/ext/sqlite/tests/sqlite_017.phpt b/ext/sqlite/tests/sqlite_017.phpt index ab41627b36..9058622f99 100755 --- a/ext/sqlite/tests/sqlite_017.phpt +++ b/ext/sqlite/tests/sqlite_017.phpt @@ -22,8 +22,6 @@ foreach ($data as $item) { } } -sqlite_close($db); - echo "OK!\n"; ?> diff --git a/ext/sqlite/tests/sqlite_oo_020.phpt b/ext/sqlite/tests/sqlite_oo_020.phpt index b2ddae7867..49adaea8b1 100755 --- a/ext/sqlite/tests/sqlite_oo_020.phpt +++ b/ext/sqlite/tests/sqlite_oo_020.phpt @@ -41,11 +41,13 @@ while ($r->hasMore()) { var_dump($r->current(SQLITE_NUM)); $r->next(); } +$r = null; +$db = null; echo "DONE!\n"; ?> --EXPECTF-- Message: sqlite_factory() expects at least 1 parameter, 0 given -File: %s/sqlite_oo_020.php +File: %ssqlite_oo_020.php array(2) { [0]=> string(3) "one" diff --git a/ext/standard/tests/strings/bug24098.phpt b/ext/standard/tests/strings/bug24098.phpt index 579b41d4b3..9ff51a420f 100644 --- a/ext/standard/tests/strings/bug24098.phpt +++ b/ext/standard/tests/strings/bug24098.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #24098 (pathinfo() crash) +--SKIPIF-- +<?php if (DIRECTORY_SEPARATOR == '\\') die("skip directory separator won't match expected output"); ?> --FILE-- <?php var_dump(pathinfo("/dsds.asa")); |
