]> granicus.if.org Git - php/commitdiff
Allowing "%unicode|string%" as a placeholder. In 6, this placeholder is resolved
authorLars Strojny <lstrojny@php.net>
Wed, 23 Jul 2008 16:10:14 +0000 (16:10 +0000)
committerLars Strojny <lstrojny@php.net>
Wed, 23 Jul 2008 16:10:14 +0000 (16:10 +0000)
to "unicode", in <6 to "string". This allows to easily write portable tests.
Patch by uw

run-tests.php

index ad73e0db2573a61ce342ae3368dd28b551430788..2546d028551025cad906ad130e09dcdd1e713c53 100755 (executable)
@@ -1711,6 +1711,11 @@ COMMAND $cmd
 
                if (isset($section_text['EXPECTF'])) {
                        $wanted_re = preg_quote($wanted_re, '/');
+                       $wanted_re = str_replace(
+                               array('%unicode\|string%', '%string\|unicode%'),
+                               version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode',
+                               $wanted_re
+                       );
                        // Stick to basics
                        $wanted_re = str_replace('%e', '\\' . DIRECTORY_SEPARATOR, $wanted_re);
                        $wanted_re = str_replace('%s', '[^\r\n]+', $wanted_re);