From d21b028281bedc0bccdc82dd2f7833db7892e147 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 10 Nov 2010 18:46:05 +0000 Subject: [PATCH] Improve test portability --- ext/oci8/tests/bind_char_1.phpt | 11 +++++-- ext/oci8/tests/bind_char_2.phpt | 11 +++++-- ext/oci8/tests/bind_char_3.phpt | 11 +++++-- ext/oci8/tests/bind_char_4.phpt | 11 +++++-- ext/oci8/tests/bug27303_1.phpt | 11 +++++-- ext/oci8/tests/bug27303_2.phpt | 11 +++++-- ext/oci8/tests/bug27303_4.phpt | 11 +++++-- ext/oci8/tests/debug.phpt | 56 +++------------------------------ 8 files changed, 61 insertions(+), 72 deletions(-) diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index 71cccbfc50..24ab1fc825 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -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-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- 1[1]\./', $phpinfo); + if ($iv != 1) { + die ("skip test expected to work only with Oracle 11g or greater version of client"); + } } ?> --FILE-- (11\.2|12\.)/', $phpinfo); -if ($iv !== 1) { - die ("skip expected output only valid when using Oracle 11gR2+ client libraries"); -} -?> + --FILE-- ---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$ -- 2.40.0