Migrate more SKIPIF -> EXTENSIONS (#7139)

This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
This commit is contained in:
Nikita Popov 2021-06-11 12:58:44 +02:00 committed by GitHub
parent e989492f1a
commit 39131219e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
486 changed files with 1132 additions and 879 deletions

View File

@ -1,7 +1,7 @@
--TEST--
Bug #77494 (Disabling class causes segfault on member access)
--SKIPIF--
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
--EXTENSIONS--
curl
--INI--
disable_classes=CURLFile,ErrorException
--FILE--

View File

@ -1,7 +1,7 @@
--TEST--
GC 039: Garbage created by replacing argument send by reference
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--INI--
zend.enable_gc = 1
--FILE--

View File

@ -1,11 +1,7 @@
--TEST--
Bug #46711 (lost memory when foreach is used for values passed to curl_setopt())
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php
$ch = curl_init();

View File

@ -1,13 +1,7 @@
--TEST--
Bug #48514 (cURL extension uses same resource name for simple and multi APIs)
--SKIPIF--
<?php
if (!extension_loaded('curl')) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,9 +1,7 @@
--TEST--
Bug #52202 (CURLOPT_PRIVATE gets clobbered)
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--EXTENSIONS--
curl
--FILE--
<?php
$curl = curl_init("http://www.google.com");

View File

@ -1,13 +1,7 @@
--TEST--
Bug #52827 (curl_setopt with CURLOPT_STDERR erroneously increments the resource refcount)
--SKIPIF--
<?php
if (!extension_loaded('curl')) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php
$s = fopen('php://temp/maxmemory=1024','wb+');

View File

@ -1,11 +1,7 @@
--TEST--
Bug #63795 (CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php
$ch = curl_init();

View File

@ -1,9 +1,10 @@
--TEST--
Bug #64267 (CURLOPT_INFILE doesn't allow reset)
--EXTENSIONS--
curl
--SKIPIF--
<?php
if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
extension_loaded("curl") or die("skip need ext/curl");
?>
--FILE--
<?php

View File

@ -1,9 +1,7 @@
--TEST--
Bug #65458 (curl memory leak)
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--EXTENSIONS--
curl
--FILE--
<?php
$ch = curl_init();

View File

@ -1,8 +1,9 @@
--TEST--
Bug #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or safe_mode): open_basedir disabled
--EXTENSIONS--
curl
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
if (ini_get('open_basedir')) exit("skip open_basedir is set");
?>
--FILE--

View File

@ -2,10 +2,8 @@
Bug #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or safe_mode): open_basedir enabled; curl >= 7.19.4
--INI--
open_basedir=.
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--EXTENSIONS--
curl
--FILE--
<?php
$ch = curl_init();

View File

@ -1,11 +1,7 @@
--TEST--
Bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_multi_exec)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,11 +1,7 @@
--TEST--
Bug #72202 (curl_close doesn't close cURL handle)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php
$a = fopen(__FILE__, "r");

View File

@ -1,11 +1,7 @@
--TEST--
Bug #73147: Use After Free in PHP7 unserialize()
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,13 +1,7 @@
--TEST--
Bug #77946 (Errored cURL resources returned by curl_multi_info_read() must be compatible with curl_errno() and curl_error())
--SKIPIF--
<?php
if (!extension_loaded('curl')) {
exit('skip curl extension not loaded');
}
?>
--EXTENSIONS--
curl
--FILE--
<?php
$urls = array(

View File

@ -2,8 +2,8 @@
Test curl_init() function with basic functionality
--CREDITS--
Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
--EXTENSIONS--
curl
--FILE--
<?php
$ch = curl_init();

View File

@ -2,8 +2,8 @@
Test curl_init() function with $url parameter defined
--CREDITS--
Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
--EXTENSIONS--
curl
--FILE--
<?php
$url = 'http://www.example.com/';

View File

@ -3,10 +3,8 @@ Test curl_copy_handle() function with basic functionality
--CREDITS--
Francesco Fullone ff@ideato.it
#PHPTestFest Cesena Italia on 2009-06-20
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
?>
--EXTENSIONS--
curl
--FILE--
<?php
echo "*** Testing curl_copy_handle(): basic ***\n";

View File

@ -3,10 +3,8 @@ Test curl_copy_handle() change options in one handle
--CREDITS--
Francesco Fullone ff@ideato.it
#PHPTestFest Cesena Italia on 2009-06-20
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
?>
--EXTENSIONS--
curl
--FILE--
<?php
echo "*** Testing curl_copy_handle(): basic ***\n";

View File

@ -3,10 +3,8 @@ Test curl_copy_handle() add options to the handles
--CREDITS--
Francesco Fullone ff@ideato.it
#PHPTestFest Cesena Italia on 2009-06-20
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
?>
--EXTENSIONS--
curl
--DESCRIPTION--
the only way to test if a option is setten on a curl handle is using the curl_getinfo() function.
but this can only check on a limited amount of options...

View File

@ -1,8 +1,9 @@
--TEST--
Test curl_escape and curl_unescape() functions
--EXTENSIONS--
curl
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (!function_exists("curl_escape")) exit("skip curl_escape doesn't exists");
$curl_version = curl_version();
if ($curl_version['version_number'] < 0x071502) {

View File

@ -1,11 +1,7 @@
--TEST--
CURL file uploading
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php
$file = new CURLFile(__DIR__ . '/curl_testdata1.txt');

View File

@ -1,8 +1,9 @@
--TEST--
Test curl_exec() function with basic functionality
--EXTENSIONS--
curl
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_FTP_REMOTE_SERVER')) exit("skip PHP_CURL_FTP_REMOTE_SERVER env variable is not defined");
if (false === getenv('PHP_CURL_FTP_REMOTE_USER')) exit("skip PHP_CURL_FTP_REMOTE_USER env variable is not defined");
if (false === getenv('PHP_CURL_FTP_REMOTE_PASSWD')) exit("skip PHP_CURL_FTP_REMOTE_PASSWD env variable is not defined");

View File

@ -1,11 +1,7 @@
--TEST--
curl_multi_errno and curl_multi_strerror basic test
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,8 +1,9 @@
--TEST--
Segfault due to libcurl connection caching
--EXTENSIONS--
curl
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_FTP_REMOTE_SERVER')) exit("skip PHP_CURL_FTP_REMOTE_SERVER env variable is not defined");
if (false === getenv('PHP_CURL_FTP_REMOTE_USER')) exit("skip PHP_CURL_FTP_REMOTE_USER env variable is not defined");
if (false === getenv('PHP_CURL_FTP_REMOTE_PASSWD')) exit("skip PHP_CURL_FTP_REMOTE_PASSWD env variable is not defined");

View File

@ -1,11 +1,7 @@
--TEST--
curl_multi_setopt basic test
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,11 +1,7 @@
--TEST--
curl_multi_strerror basic test
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,11 +1,7 @@
--TEST--
curl_share_errno and curl_share_strerror basic test
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,11 +1,7 @@
--TEST--
curl_share_setopt basic test
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,11 +1,7 @@
--TEST--
curl_strerror basic test
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php

View File

@ -1,11 +1,7 @@
--TEST--
Test curl_version() basic functionality
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
?>
--EXTENSIONS--
curl
--FILE--
<?php
$info_curl = curl_version();

View File

@ -1,9 +1,7 @@
--TEST--
CURLOPT_PRIVATE
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--EXTENSIONS--
curl
--FILE--
<?php
$curl = curl_init("foobar");

View File

@ -1,7 +1,7 @@
--TEST--
FILTER_NULL_ON_FAILURE will give NULL on filters
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--EXTENSIONS--
filter
--FILE--
<?php
var_dump(filter_var("invalid", FILTER_VALIDATE_BOOL, FILTER_NULL_ON_FAILURE));

View File

@ -1,9 +1,7 @@
--TEST--
Bug #31142 test #2 (imap_mail_compose() generates incorrect output)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
$envelope["from"]= 'host@domain.com';

View File

@ -1,9 +1,7 @@
--TEST--
Bug #32589 (crash inside imap_mail_compose() function)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
$m_envelope["To"] = "mail@example.com";

View File

@ -1,9 +1,7 @@
--TEST--
Bug #35669 (imap_mail_compose() crashes with multipart-multiboundary-email)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
$envelope["from"] = 'Santa <somewhere@northpole.gov>';

View File

@ -1,9 +1,7 @@
--TEST--
Bug #44098 (imap_utf8() returns only capital letters)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
$exp = 'Luzon®14 dot CoM';

View File

@ -1,9 +1,7 @@
--TEST--
Bug #45705 test #1 (imap rfc822_parse_adrlist() modifies passed address parameter)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php

View File

@ -1,9 +1,7 @@
--TEST--
Bug #45705 test #2 (imap rfc822_parse_adrlist() modifies passed address parameter)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php

View File

@ -1,9 +1,7 @@
--TEST--
Bug #53377 (imap_mime_header_decode() doesn't ignore \t during long MIME header unfolding)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
$s = "=?UTF-8?Q?=E2=82=AC?=";

View File

@ -1,9 +1,9 @@
--TEST--
imap_open() DISABLE_AUTHENTICATOR ignores array param
--EXTENSIONS--
imap
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
require_once(__DIR__. '/setup/imap_include.inc');
$in = @imap_open(IMAP_SERVER_DEBUG, IMAP_MAILBOX_USERNAME, IMAP_MAILBOX_PASSWORD, OP_HALFOPEN, 1);

View File

@ -1,9 +1,7 @@
--TEST--
Bug #75774 imap_append HeapCorruction
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php

View File

@ -1,9 +1,7 @@
--TEST--
Bug #77153 (imap_open allows to run arbitrary shell commands via mailbox parameter)
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--CONFLICTS--
defaultmailbox
--FILE--

View File

@ -1,9 +1,7 @@
--TEST--
Test imap_8bit() function : basic functionality
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
echo "*** Testing imap_8bit() : basic functionality ***\n";

View File

@ -1,9 +1,7 @@
--TEST--
Test imap_base64() function : basic functionality
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
echo "*** Testing imap_base64() : basic functionality ***\n";

View File

@ -1,9 +1,7 @@
--TEST--
Test imap_binary() function : basic functionality
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
?>
--EXTENSIONS--
imap
--FILE--
<?php
echo "*** Testing imap_binary() : basic functionality ***\n";

View File

@ -1,8 +1,7 @@
--TEST--
Attempt to instantiate an IMAP\Connection directly
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
--EXTENSIONS--
imap
--FILE--
<?php

View File

@ -1,8 +1,7 @@
--TEST--
Check that IMAP\Connection is declared final
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
--EXTENSIONS--
imap
--FILE--
<?php

View File

@ -2,9 +2,8 @@
IntlDateFormat constructor failure
--INI--
date.timezone=Mars/Utopia_Planitia
--SKIPIF--
<?php
extension_loaded('intl') || print 'skip';
--EXTENSIONS--
intl
--FILE--
<?php

View File

@ -1,8 +1,7 @@
--TEST--
Bug #74993 Wrong reflection on some locale_* functions
--SKIPIF--
<?php
extension_loaded('intl') || print 'skip';
--EXTENSIONS--
intl
--FILE--
<?php
$funcs = [

View File

@ -1,7 +1,9 @@
--TEST--
spoofchecker suspicious character checker
--EXTENSIONS--
intl
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '57.1') >= 0)die('skip for ICU <= 57.1'); ?>
--FILE--
<?php

View File

@ -1,7 +1,9 @@
--TEST--
spoofchecker confusable tests
--EXTENSIONS--
intl
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
--FILE--
<?php

View File

@ -1,7 +1,9 @@
--TEST--
spoofchecker with locale settings
--EXTENSIONS--
intl
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
--FILE--
<?php

View File

@ -1,7 +1,9 @@
--TEST--
spoofchecker with settings changed
--EXTENSIONS--
intl
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '55.1') >= 0) die('skip for ICU < 55.1'); ?>
--FILE--
<?php

View File

@ -1,7 +1,9 @@
--TEST--
spoofchecker with settings changed
--EXTENSIONS--
intl
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '55.1') < 0) die('skip for ICU >= 55.1'); ?>
--FILE--
<?php

View File

@ -1,7 +1,9 @@
--TEST--
spoofchecker suspicious character checker
--EXTENSIONS--
intl
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '57.1') < 0) die('skip for ICU >= 58.1'); ?>
--FILE--
<?php

View File

@ -1,7 +1,9 @@
--TEST--
spoofchecker with restriction level
--EXTENSIONS--
intl
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
<?php
$r = new ReflectionClass("SpoofChecker");
if (false === $r->getConstant("SINGLE_SCRIPT_RESTRICTIVE")) {

View File

@ -1,8 +1,10 @@
--TEST--
Spoofchecker attempting to pass an unknown restriction level
--EXTENSIONS--
intl
--SKIPIF--
<?php
if (!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip';
if (!class_exists("Spoofchecker")) print 'skip';
if (!method_exists(new Spoofchecker(), 'setRestrictionLevel')) print 'skip ICU version < 58';
?>

View File

@ -1,8 +1,9 @@
--TEST--
Exhaustive test of verification and conversion of ARMSCII-8 text
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--

View File

@ -1,7 +1,7 @@
--TEST--
Bug #25140 (mb_convert_encoding returns FALSE on an empty string)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump( mb_convert_encoding( '', 'SJIS', 'EUC-JP' ) );

View File

@ -1,7 +1,7 @@
--TEST--
Bug #26639 (mb_convert_variables() clutters variables beyond the references)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
$a = "あいうえお";

View File

@ -1,7 +1,7 @@
--TEST--
Bug #30549 (incorrect character translations for some ISO8859 charsets)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
test('ISO-8859-7', array(0xa4 => 0x20ac, 0xa5 => 0x20af, 0xaa => 0x037a));

View File

@ -1,7 +1,7 @@
--TEST--
Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
echo mb_decode_mimeheader("Works: =?iso-8859-1?q?=3F=3F=3F?=");

View File

@ -1,7 +1,7 @@
--TEST--
Bug #40685 (mb_decode_numericentity() removes '&' in the string)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
$map = array(0, 0x10FFFF, 0, 0xFFFFFF);

View File

@ -1,8 +1,9 @@
--TEST--
Test mb_strpos() function : mb_strpos bounds check is byte count rather than a character count
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
?>
--FILE--

View File

@ -1,8 +1,9 @@
--TEST--
Test mb_strrpos() function : mb_strrpos offset is byte count for negative values
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
function_exists('mb_strrpos') or die("skip mb_strrpos() is not available in this build");
?>
--FILE--

View File

@ -1,7 +1,7 @@
--TEST--
Bug #43993 (mb_substr_count() behaves differently to substr_count() with overlapping needles)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(mb_substr_count("abcabcabca", "abcabc"));

View File

@ -1,8 +1,9 @@
--TEST--
Test mb_ereg() function : mb_ereg 'successfully' matching incorrectly
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
?>
--FILE--

View File

@ -1,8 +1,9 @@
--TEST--
Test mb_strtolower() function : Two error messages returned for incorrect encoding for mb_strto[upper|lower]
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
?>
--FILE--

View File

@ -4,10 +4,8 @@ Bug #45239 (encoding detector hangs with mbstring.strict_detection enabled)
mbstring.strict_detection=1
input_encoding=UTF-8
internal_encoding=UTF-8
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
?>
--EXTENSIONS--
mbstring
--FILE--
<?php
mb_internal_encoding("utf-8");

View File

@ -1,7 +1,7 @@
--TEST--
Bug #45722 (mb_check_encoding() crashes)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(mb_check_encoding("&\xc2\xb7 TEST TEST TEST TEST TEST TEST", "HTML-ENTITIES"));

View File

@ -1,7 +1,7 @@
--TEST--
Bug #45923 (mb_st[r]ripos() offset not handled correctly)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php

View File

@ -1,7 +1,7 @@
--TEST--
Bug #46843 (CP936 euro symbol is not converted properly)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(bin2hex(mb_convert_encoding("\x80", 'UCS-2BE', 'CP936')));

View File

@ -1,7 +1,7 @@
--TEST--
Bug #48645 (mb_convert_encoding() doesn't understand hexadecimal html-entities)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(bin2hex(mb_convert_encoding("&#x0;", "UTF-8", "HTML-ENTITIES")));

View File

@ -1,7 +1,7 @@
--TEST--
Bug #48697 (mb_internal_encoding() value gets reset by parse_str() or mb_parse_str()
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
ini_set('mbstring.internal_encoding', 'ISO-8859-15');

View File

@ -1,7 +1,7 @@
--TEST--
Bug #49354 (mb_strcut() cuts wrong length when offset is in the middle of a multibyte character)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
$crap = 'AåBäCöDü';

View File

@ -1,7 +1,7 @@
--TEST--
Bug #49528 (UTF-16 strings prefixed by BOM wrongly converted)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(bin2hex(mb_convert_encoding("\xff\xfe\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));

View File

@ -1,7 +1,7 @@
--TEST--
Bug #49536 (mb_detect_encoding() returns incorrect results when strict_mode is turned on)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
// non-strict mode

View File

@ -1,7 +1,7 @@
--TEST--
Bug #52981 (Unicode properties are outdated (from Unicode 3.2))
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
function test($str)

View File

@ -1,7 +1,7 @@
--TEST--
Bug #54494: mb_substr() mishandles UTF-32LE and UCS-2LE
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php

View File

@ -1,7 +1,7 @@
--TEST--
Bug #60306 (Characters lost while converting from cp936 to utf8)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
$s = "洪仁玕";

View File

@ -1,9 +1,7 @@
--TEST--
Bug #63447 (max_input_vars doesn't filter variables when mbstring.encoding_translation = On)
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
?>
--EXTENSIONS--
mbstring
--INI--
max_input_nesting_level=10
max_input_vars=5

View File

@ -1,9 +1,7 @@
--TEST--
Bug #63447 (max_input_vars doesn't filter variables when mbstring.encoding_translation = On)
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
?>
--EXTENSIONS--
mbstring
--INI--
max_input_nesting_level=10
max_input_vars=4

View File

@ -1,9 +1,7 @@
--TEST--
Bug #63447 (max_input_vars doesn't filter variables when mbstring.encoding_translation = On)
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
?>
--EXTENSIONS--
mbstring
--INI--
max_input_nesting_level=5
max_input_vars=100

View File

@ -1,7 +1,7 @@
--TEST--
Bug #65045: mb_convert_encoding breaks well-formed character
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php

View File

@ -1,7 +1,7 @@
--TEST--
Bug #66964 (mb_convert_variables() cannot detect recursion)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
$a[] = &$a;

View File

@ -1,7 +1,7 @@
--TEST--
Bug #68846 False detection of CJK Unified Ideographs Extension E
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(

View File

@ -1,7 +1,7 @@
--TEST--
Bug #69079 (enhancement for mb_substitute_character)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php

View File

@ -1,7 +1,7 @@
--TEST--
Request #69086 (enhancement for mb_convert_encoding)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
mb_substitute_character(0xfffd);

View File

@ -1,8 +1,9 @@
--TEST--
Bug #69151 (mb_ereg should reject ill-formed byte sequence)
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (!function_exists('mb_ereg')) die('skip mbregex support not available');
?>
--FILE--

View File

@ -1,8 +1,9 @@
--TEST--
Bug #72164 (Null Pointer Dereference - mb_ereg_replace)
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (!function_exists('mb_ereg')) die('skip mbregex support not available');
?>
--FILE--

View File

@ -1,8 +1,9 @@
--TEST--
Bug #72402: _php_mb_regex_ereg_replace_exec - double free
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (!function_exists('mb_ereg')) die('skip mbregex support not available');
?>
--FILE--

View File

@ -1,7 +1,7 @@
--TEST--
Bug #75944 (wrong detection cp1251 encoding because of missing last cyrillic letter)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(mb_detect_encoding(chr(0xfe), array('CP-1251'))); // letter '?'

View File

@ -1,7 +1,7 @@
--TEST--
Bug #79441 Segfault in mb_chr() if internal encoding is unsupported
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php

View File

@ -1,7 +1,7 @@
--TEST--
Bug #79787 mb_strimwidth does not trim string
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--EXTENSIONS--
mbstring
--FILE--
<?php
echo mb_strimwidth("一二三", 0, 4, '.', 'UTF-8')."\n";

View File

@ -1,8 +1,9 @@
--TEST--
mb_strtoupper() / mb_strtolower()
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
function_exists('mb_strtolower') and
function_exists('mb_convert_case' ) or die("skip mb_convert_case() is not available");
?>

View File

@ -1,8 +1,9 @@
--TEST--
Exhaustive test of verification and conversion of CP1251 text
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--

View File

@ -1,8 +1,9 @@
--TEST--
Exhaustive test of verification and conversion of CP1252 text
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--

View File

@ -1,8 +1,9 @@
--TEST--
Exhaustive test of verification and conversion of CP1254 text
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--

View File

@ -1,8 +1,9 @@
--TEST--
Exhaustive test of CP50220, CP50221, and CP50222 encodings
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--

Some files were not shown because too many files have changed in this diff Show More