summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-11 16:29:52 +0100
committerRemi Collet <remi@remirepo.net>2020-03-11 16:29:52 +0100
commit9d455172490b3c768eda092e0898b666e17a23d2 (patch)
treea55f9125d009b5be6925b310ccb3663e6e5d7a22 /tests
parentdb270c6c4667957045127ad04af206ce48e9a5c8 (diff)
add simple test for glob/regex search
Diffstat (limited to 'tests')
-rw-r--r--tests/008-rpmdbinfo2.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/008-rpmdbinfo2.phpt b/tests/008-rpmdbinfo2.phpt
new file mode 100644
index 0000000..940ad61
--- /dev/null
+++ b/tests/008-rpmdbinfo2.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Check for rpmdbinfo function
+--SKIPIF--
+<?php if (!extension_loaded("rpminfo")) print "skip"; ?>
+--FILE--
+<?php
+$a = rpmdbinfo('php*', false, RPM_MATCH_GLOB);
+var_dump(count($a) > 1);
+$a = rpmdbinfo('^php', false, RPM_MATCH_REGEX);
+var_dump(count($a) > 1);
+?>
+Done
+--EXPECTF--
+bool(true)
+bool(true)
+Done