summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/005-rpminfo-full.phpt23
1 files changed, 20 insertions, 3 deletions
diff --git a/tests/005-rpminfo-full.phpt b/tests/005-rpminfo-full.phpt
index e4de7ee..38f5bab 100644
--- a/tests/005-rpminfo-full.phpt
+++ b/tests/005-rpminfo-full.phpt
@@ -6,17 +6,22 @@ Check for rpminfo function
--FILE--
<?php
foreach ([__DIR__ . "/bidon.rpm", __DIR__ . "/bidon-src.rpm"] as $rpm) {
- echo "--- $rpm ---\n";
+ echo "--- " . basename($rpm) . " ---\n";
$i = rpminfo($rpm, true);
var_dump($i['Name']);
var_dump($i['Description']);
var_dump($i['Changelogtext']);
var_dump($i['IsSource']);
+ if (!$i['IsSource']) {
+ var_dump($i['Obsoletename']);
+ var_dump($i['Obsoleteflags']);
+ var_dump($i['Obsoleteversion']);
+ }
}
?>
Done
--EXPECTF--
---- /work/GIT/rpminfo/tests/bidon.rpm ---
+--- bidon.rpm ---
string(5) "bidon"
string(15) "A dummy package"
array(1) {
@@ -24,7 +29,19 @@ array(1) {
string(8) "- create"
}
bool(false)
---- /work/GIT/rpminfo/tests/bidon-src.rpm ---
+array(1) {
+ [0]=>
+ string(6) "fooobs"
+}
+array(1) {
+ [0]=>
+ int(2)
+}
+array(1) {
+ [0]=>
+ string(1) "2"
+}
+--- bidon-src.rpm ---
string(5) "bidon"
string(15) "A dummy package"
array(1) {