summaryrefslogtreecommitdiff
path: root/ext/pcre/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/tests')
-rw-r--r--ext/pcre/tests/007.phpt6
-rw-r--r--ext/pcre/tests/backtrack_limit.phpt6
-rw-r--r--ext/pcre/tests/bug27103.phpt6
-rw-r--r--ext/pcre/tests/invalid_utf8.phpt6
-rw-r--r--ext/pcre/tests/invalid_utf8_offset.phpt6
-rw-r--r--ext/pcre/tests/locales.phpt3
-rw-r--r--ext/pcre/tests/pcre_anchored.phpt6
-rw-r--r--ext/pcre/tests/preg_replace2.phpt6
-rw-r--r--ext/pcre/tests/recursion_limit.phpt6
-rw-r--r--ext/pcre/tests/skip.ini17
-rw-r--r--ext/pcre/tests/skip_001.inc9
-rw-r--r--ext/pcre/tests/skip_002.inc5
-rw-r--r--ext/pcre/tests/skip_003.inc5
13 files changed, 36 insertions, 51 deletions
diff --git a/ext/pcre/tests/007.phpt b/ext/pcre/tests/007.phpt
index 776bec27b2..97d4633a12 100644
--- a/ext/pcre/tests/007.phpt
+++ b/ext/pcre/tests/007.phpt
@@ -1,11 +1,5 @@
--TEST--
preg_replace_callback() with callback that modifies subject string
---SKIPIF--
-<?php
-if (@preg_match('/./u', '') === false) {
- die('skip no utf8 support in PCRE library');
-}
-?>
--FILE--
<?php
diff --git a/ext/pcre/tests/backtrack_limit.phpt b/ext/pcre/tests/backtrack_limit.phpt
index 210628f839..ebfd720c3c 100644
--- a/ext/pcre/tests/backtrack_limit.phpt
+++ b/ext/pcre/tests/backtrack_limit.phpt
@@ -1,11 +1,5 @@
--TEST--
Backtracking limit
---SKIPIF--
-<?php
-if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
- die("skip no support for \p support PCRE library");
-}
-?>
--INI--
pcre.backtrack_limit=2
--FILE--
diff --git a/ext/pcre/tests/bug27103.phpt b/ext/pcre/tests/bug27103.phpt
index 0be4c67d4a..185225d310 100644
--- a/ext/pcre/tests/bug27103.phpt
+++ b/ext/pcre/tests/bug27103.phpt
@@ -1,11 +1,5 @@
--TEST--
Bug #27103 (preg_split('//u') incorrectly splits UTF-8 strings into octets)
---SKIPIF--
-<?php
-if (@preg_match_all('/./u', "", $matches) === false) {
- die("skip no utf8 support in PCRE library");
-}
-?>
--FILE--
<?php
function iter($ar)
diff --git a/ext/pcre/tests/invalid_utf8.phpt b/ext/pcre/tests/invalid_utf8.phpt
index 8f9f40bb91..df2de2da9b 100644
--- a/ext/pcre/tests/invalid_utf8.phpt
+++ b/ext/pcre/tests/invalid_utf8.phpt
@@ -1,11 +1,5 @@
--TEST--
preg_replace() and invalid UTF8
---SKIPIF--
-<?php
-if (@preg_match_all('/./u', "", $matches) === false) {
- die("skip no utf8 support in PCRE library");
-}
-?>
--FILE--
<?php
diff --git a/ext/pcre/tests/invalid_utf8_offset.phpt b/ext/pcre/tests/invalid_utf8_offset.phpt
index 4e0d40caf4..30fe7029da 100644
--- a/ext/pcre/tests/invalid_utf8_offset.phpt
+++ b/ext/pcre/tests/invalid_utf8_offset.phpt
@@ -1,11 +1,5 @@
--TEST--
preg_replace() and invalid UTF8 offset
---SKIPIF--
-<?php
-if (@preg_match('/./u', '') === false) {
- die('skip no utf8 support in PCRE library');
-}
-?>
--FILE--
<?php
diff --git a/ext/pcre/tests/locales.phpt b/ext/pcre/tests/locales.phpt
index 6b600236cf..647c0d8f7e 100644
--- a/ext/pcre/tests/locales.phpt
+++ b/ext/pcre/tests/locales.phpt
@@ -1,8 +1,5 @@
--TEST--
Localized match
---SKIPIF--
-<?php if (!function_exists('setlocale')) die('skip: setlocale() not available'); ?>
-<?php if (!@setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese')) die('skip pt locale not available');
--FILE--
<?php
diff --git a/ext/pcre/tests/pcre_anchored.phpt b/ext/pcre/tests/pcre_anchored.phpt
index fd2d7a18b1..caa96437e1 100644
--- a/ext/pcre/tests/pcre_anchored.phpt
+++ b/ext/pcre/tests/pcre_anchored.phpt
@@ -1,11 +1,5 @@
--TEST--
A (PCRE_ANCHORED) modififer
---SKIPIF--
-<?php
-if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
- die("skip no support for \p support PCRE library");
-}
-?>
--FILE--
<?php
diff --git a/ext/pcre/tests/preg_replace2.phpt b/ext/pcre/tests/preg_replace2.phpt
index 0901c3b024..4e2f39f8ca 100644
--- a/ext/pcre/tests/preg_replace2.phpt
+++ b/ext/pcre/tests/preg_replace2.phpt
@@ -1,11 +1,5 @@
--TEST--
preg_replace()
---SKIPIF--
-<?php
-if (@preg_match_all('/./u', "", $matches) === false) {
- die("skip no utf8 support in PCRE library");
-}
-?>
--FILE--
<?php
diff --git a/ext/pcre/tests/recursion_limit.phpt b/ext/pcre/tests/recursion_limit.phpt
index 17bb5bcb67..2a43aa27d6 100644
--- a/ext/pcre/tests/recursion_limit.phpt
+++ b/ext/pcre/tests/recursion_limit.phpt
@@ -1,11 +1,5 @@
--TEST--
PCRE Recursion limit
---SKIPIF--
-<?php
-if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
- die("skip no support for \p support PCRE library");
-}
-?>
--INI--
pcre.recursion_limit=2
--FILE--
diff --git a/ext/pcre/tests/skip.ini b/ext/pcre/tests/skip.ini
new file mode 100644
index 0000000000..1388e9219b
--- /dev/null
+++ b/ext/pcre/tests/skip.ini
@@ -0,0 +1,17 @@
+[Locale checks]
+skip[]=skip_001.inc
+test[]=locales.phpt
+
+[No utf8 support in PCRE library]
+skip[]=skip_002.inc
+test[]=007.phpt
+test[]=bug27103.phpt
+test[]=invalid_utf8_offset.phpt
+test[]=invalid_utf8.phpt
+test[]=preg_replace2.phpt
+
+[No support for \p support PCRE library]
+skip[]=skip_003.inc
+test[]=backtrack_limit.phpt
+test[]=pcre_anchored.phpt
+test[]=recursion_limit.phpt
diff --git a/ext/pcre/tests/skip_001.inc b/ext/pcre/tests/skip_001.inc
new file mode 100644
index 0000000000..410512d4e7
--- /dev/null
+++ b/ext/pcre/tests/skip_001.inc
@@ -0,0 +1,9 @@
+<?php
+
+if (!function_exists('setlocale')) {
+ die('skip: setlocale() not available');
+}
+
+if (!@setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese')) {
+ die('skip pt locale not available');
+}
diff --git a/ext/pcre/tests/skip_002.inc b/ext/pcre/tests/skip_002.inc
new file mode 100644
index 0000000000..7f3a253faa
--- /dev/null
+++ b/ext/pcre/tests/skip_002.inc
@@ -0,0 +1,5 @@
+<?php
+
+if (@preg_match('/./u', '') === false) {
+ die('skip');
+}
diff --git a/ext/pcre/tests/skip_003.inc b/ext/pcre/tests/skip_003.inc
new file mode 100644
index 0000000000..af2f548ca1
--- /dev/null
+++ b/ext/pcre/tests/skip_003.inc
@@ -0,0 +1,5 @@
+<?php
+
+if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
+ die('skip');
+}