summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/bind_char_3.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8/tests/bind_char_3.phpt')
-rw-r--r--ext/oci8/tests/bind_char_3.phpt13
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt
index 25115836df..009e60a542 100644
--- a/ext/oci8/tests/bind_char_3.phpt
+++ b/ext/oci8/tests/bind_char_3.phpt
@@ -5,12 +5,15 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
require(dirname(__FILE__)."/connect.inc");
// The bind buffer size edge cases seem to change each DB version.
-if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) {
- if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) {
- die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
- }
+preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
+if (!(isset($matches[0]) &&
+ (($matches[1] == 10 && $matches[2] >= 2) ||
+ ($matches[1] == 11 && $matches[2] == 2 && $matches[3] == 0 && $matches[4] == 2)
+ ))) {
+ die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases");
}
-if (preg_match('/^11\./', oci_client_version()) != 1) {
+preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+if (isset($matches[0]) && $matches[0] < 11) {
die("skip test expected to work only with Oracle 11g or greater version of client");
}
?>