1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00

Improve test portability

This commit is contained in:
Christopher Jones
2010-11-10 18:46:05 +00:00
parent 332b953865
commit d21b028281
8 changed files with 61 additions and 72 deletions
+8 -3
View File
@@ -8,14 +8,19 @@ $sv = oci_server_version($c);
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
if ($iv != 1) {
die ("skip test expected to work only with Oracle 11g or greater version of client");
}
}
?>
--FILE--
<?php
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
require(dirname(__FILE__).'/connect.inc');
// Initialization
+8 -3
View File
@@ -8,14 +8,19 @@ $sv = oci_server_version($c);
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
if ($iv != 1) {
die ("skip test expected to work only with Oracle 11g or greater version of client");
}
}
?>
--FILE--
<?php
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
require(dirname(__FILE__).'/connect.inc');
// Initialization
+8 -3
View File
@@ -8,14 +8,19 @@ $sv = oci_server_version($c);
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 10gR2 11gR2 databases");
} else {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
if ($iv != 1) {
die ("skip test expected to work only with Oracle 11g or greater version of client");
}
}
?>
--FILE--
<?php
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
require(dirname(__FILE__).'/connect.inc');
// Initialization
+8 -3
View File
@@ -8,14 +8,19 @@ $sv = oci_server_version($c);
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
if ($iv != 1) {
die ("skip test expected to work only with Oracle 11g or greater version of client");
}
}
?>
--FILE--
<?php
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
// It will diff on the undefined cases with a 32bit 11.2.0.1 DB
// Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR
require(dirname(__FILE__).'/connect.inc');
+8 -3
View File
@@ -8,14 +8,19 @@ $sv = oci_server_version($c);
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 19gR2 or 11gR2 databases");
} else {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
if ($iv != 1) {
die ("skip test expected to work only with Oracle 11g or greater version of client");
}
}
?>
--FILE--
<?php
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
// It will diff with a 32bit 11.2.0.1 DB
require dirname(__FILE__).'/connect.inc';
$create_st = array();
+8 -3
View File
@@ -8,14 +8,19 @@ $sv = oci_server_version($c);
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 database");
} else {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
if ($iv != 1) {
die ("skip test expected to work only with Oracle 11g or greater version of client");
}
}
?>
--FILE--
<?php
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
// It will diff with a 32bit 11.2.0.1 DB
require dirname(__FILE__).'/connect.inc';
$create_st = array();
+8 -3
View File
@@ -8,14 +8,19 @@ $sv = oci_server_version($c);
$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches);
if ($sv !== 1) {
die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases");
} else {
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => 1[1]\./', $phpinfo);
if ($iv != 1) {
die ("skip test expected to work only with Oracle 11g or greater version of client");
}
}
?>
--FILE--
<?php
// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs.
// It will diff with a 32bit 11.2.0.1 DB
require dirname(__FILE__).'/connect.inc';
$create_st = array();
+5 -51
View File
@@ -1,16 +1,7 @@
--TEST--
oci_internal_debug()
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
ob_start();
phpinfo(INFO_MODULES);
$phpinfo = ob_get_clean();
$iv = preg_match('/Oracle .*Version => (11\.2|12\.)/', $phpinfo);
if ($iv !== 1) {
die ("skip expected output only valid when using Oracle 11gR2+ client libraries");
}
?>
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
--FILE--
<?php
@@ -27,45 +18,8 @@ else {
echo "Done\n";
oci_internal_debug(false);
?>
--EXPECTF--
OCI8 DEBUG: OCINlsEnvironmentVariableGet at (%s:%d)
OCI8 DEBUG L1: Got NO cached connection at (%s:%d)
OCI8 DEBUG: OCIEnvNlsCreate at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCISessionPoolCreate at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG L1: create_spool: (%s:%d)
OCI8 DEBUG L1: using shared pool: (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIHandleAlloc at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG L1: (numopen=0)(numbusy=0) at (%s:%d)
OCI8 DEBUG: OCISessionGet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG: OCIAttrGet at (%s:%d)
OCI8 DEBUG: OCIContextGetValue at (%s:%d)
OCI8 DEBUG: OCIContextGetValue at (%s:%d)
OCI8 DEBUG: OCIMemoryAlloc at (%s:%d)
OCI8 DEBUG: OCIContextSetValue at (%s:%d)
OCI8 DEBUG: OCIAttrSet at (%s:%d)
OCI8 DEBUG L1: New Non-Persistent Connection address: (%s) at (%s:%d)
OCI8 DEBUG L1: num_persistent=(%s:%d)
OCI8 DEBUG: OCISessionRelease at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
Done
OCI8 DEBUG: OCISessionPoolDestroy at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
OCI8 DEBUG: OCIHandleFree at (%s:%d)
--EXPECTREGEX--
^OCI8 DEBUG: .*Done$