Skip to content

Commit 9a5f0ef

Browse files
author
Ilia Alshanetsky
committed
Fixed test failure due to incorrect library check.
1 parent df0d52b commit 9a5f0ef

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ext/xslt/tests/xslt_backend_info.phpt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,21 @@ if("No information available." == xslt_backend_info()) {
2222
* not be available depending on what has been linked into the backend.
2323
*/
2424

25-
$tmp = explode("\n", xslt_backend_info());
26-
$info = array();
27-
foreach($tmp AS $line) {
28-
list($key, $value) = explode(": ", $line, 2);
29-
$info[strtolower($key)] = $value;
25+
$libs = '';
26+
if (preg_match('!Libs: ([^:]+)i!', xslt_backend_info(), $m)) {
27+
$libs = $m[1];
3028
}
3129

32-
if(FALSE === strstr($info['libs'], " -lexpat")) {
30+
if(FALSE === strstr($libs, " -lexpat")) {
3331
die("You're configuration is missing expat, which conflicts with sanity.");
3432
}
3533

36-
if(FALSE === strstr($info['libs'], " -liconv")) {
34+
if(FALSE === strstr($libs, " -liconv")) {
3735
echo("You don't have iconv support\n");
3836
} else {
3937
echo("You have iconv support\n");
4038
}
41-
if(FALSE === strstr($info['libs'], " -ljs")) {
39+
if(FALSE === strstr($libs, " -ljs")) {
4240
echo("You don't have JavaScript support\n");
4341
} else {
4442
echo("You have JavaScript support\n");

0 commit comments

Comments
 (0)