summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2014-08-18 16:43:01 +0300
committerPanu Matilainen <pmatilai@redhat.com>2014-08-18 16:55:49 +0300
commit717cdb9396446cde552e617cf866a43b7fa5c351 (patch)
treeab18c625718326c8ce1f3f3f7ce1bc95a568b7f8
parent15db12b8342b5df6f69c57f1d6b9b73523623a3e (diff)
downloadrpm-717cdb9396446cde552e617cf866a43b7fa5c351.tar.gz
Add a simple testcase for rpmspec queries
(cherry picked from commit aca73ad405c03e2f4879781d2af85b7c3d2d736f)
-rw-r--r--tests/rpmbuild.at20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
index ed1e72cde..ff0673c7f 100644
--- a/tests/rpmbuild.at
+++ b/tests/rpmbuild.at
@@ -233,3 +233,23 @@ runroot rpmbuild -bb --quiet \
foo > 1.2.3 is needed by deptest-buildreq-1.0-1.noarch
])
AT_CLEANUP
+
+# ------------------------------
+# Test spec query functionality
+AT_SETUP([rpmspec query 1])
+AT_KEYWORDS([build])
+AT_CHECK([
+
+runroot rpmspec -q \
+ --define "pkg dep" \
+ --define "reqs foo > 1.2.3 bar <= 2.3" \
+ --requires \
+ /data/SPECS/deptest.spec
+],
+[0],
+[bar <= 2.3
+foo > 1.2.3
+],
+[])
+
+AT_CLEANUP