blob: e4de7ee2db1752e921ad75ba7e450eef00893def (
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
|
--TEST--
Check for rpminfo function
--SKIPIF--
<?php if (!extension_loaded("rpminfo")) print "skip";
?>
--FILE--
<?php
foreach ([__DIR__ . "/bidon.rpm", __DIR__ . "/bidon-src.rpm"] as $rpm) {
echo "--- $rpm ---\n";
$i = rpminfo($rpm, true);
var_dump($i['Name']);
var_dump($i['Description']);
var_dump($i['Changelogtext']);
var_dump($i['IsSource']);
}
?>
Done
--EXPECTF--
--- /work/GIT/rpminfo/tests/bidon.rpm ---
string(5) "bidon"
string(15) "A dummy package"
array(1) {
[0]=>
string(8) "- create"
}
bool(false)
--- /work/GIT/rpminfo/tests/bidon-src.rpm ---
string(5) "bidon"
string(15) "A dummy package"
array(1) {
[0]=>
string(8) "- create"
}
bool(true)
Done
|