blob: 1fd849c48ffbb71462efa837bd49b6f3d8b5b721 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
--TEST--
xslt_backend_info: examples for detection of backend features
--SKIPIF--
<?php // vim600: noet sw=4 ts=4 syn=php ai si tw=78
include("skipif.inc");
if(!function_exists('xslt_backend_info')) {
die("skip\n");
}
// Yeah-right-but-still
if(xslt_backend_name() != "Sablotron") {
die("skip This test currently only supports Sablotron");
}
if("No information available." == xslt_backend_info()) {
die("skip Information could not be detected.");
}
?>
--FILE--
<?php
/*
* Test xslt_backend_info: basically this test is provided as a how-to for
* x-platform packages, which rely on certain features which may or may
* not be available depending on what has been linked into the backend.
*/
$tmp = explode("\n", xslt_backend_info());
$info = array();
foreach($tmp AS $line) {
list($key, $value) = explode(": ", $line, 2);
$info[strtolower($key)] = $value;
}
if(FALSE === strstr($info['libs'], " -lexpat")) {
die("You're configuration is missing expat, which conflicts with sanity.");
}
if(FALSE === strstr($info['libs'], " -liconv")) {
echo("You don't have iconv support\n");
} else {
echo("You have iconv support\n");
}
if(FALSE === strstr($info['libs'], " -ljs")) {
echo("You don't have JavaScript support\n");
} else {
echo("You have JavaScript support\n");
}
?>
--EXPECTREGEX--
You (don't )?have iconv support
You (don't )?have JavaScript support
|