diff options
author | Remi Collet <remi@remirepo.net> | 2020-03-13 08:43:41 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-03-13 08:43:41 +0100 |
commit | 4f467f39aeb02bb2a2f2df9c7a697601aca84db8 (patch) | |
tree | 5ee3d5be4020d6d4deadc319b542e98312cb4209 /tests/007-rpmdbinfo.phpt | |
parent | cb84354da288ca88d3ad4f5757e44e8e7e004f41 (diff) |
allow 'rpmdbinfo' to search on NEVR (instead of name only)
Diffstat (limited to 'tests/007-rpmdbinfo.phpt')
-rw-r--r-- | tests/007-rpmdbinfo.phpt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/007-rpmdbinfo.phpt b/tests/007-rpmdbinfo.phpt index 6fe3116..c568dd9 100644 --- a/tests/007-rpmdbinfo.phpt +++ b/tests/007-rpmdbinfo.phpt @@ -6,6 +6,14 @@ Check for rpmdbinfo function <?php var_dump(rpmdbinfo('doesntexistsinrpmdb')); var_dump(rpmdbinfo('bash')); + +$k = rpmdbinfo('kernel'); +var_dump(count($k) > 0); // multiple kernels +$n = $k[0]['Name'] . '-' . $k[0]['Version'] . '-' . $k[0]['Release']; + +$k = rpmdbinfo($n); // single kernel with NEVR +var_dump(count($k) ==1); + ?> Done --EXPECTF-- @@ -25,4 +33,6 @@ array(1) { string(%d) "%s" } } +bool(true) +bool(true) Done |