summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-01-28 18:03:42 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-01-28 18:13:01 +0200
commit79bfdd7e9c629b6648dd3aeed074032db02aa890 (patch)
tree973602bc9e9f2de798bbc0a9023b0003692d4bee
parent502d07cf24fda57fdf0998a220b1a1176dadd985 (diff)
downloadlibrpm-tizen-79bfdd7e9c629b6648dd3aeed074032db02aa890.tar.gz
librpm-tizen-79bfdd7e9c629b6648dd3aeed074032db02aa890.tar.bz2
librpm-tizen-79bfdd7e9c629b6648dd3aeed074032db02aa890.zip
Add a basic testcase for bogus filename triplet detection
-rw-r--r--tests/rpmpython.at23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/rpmpython.at b/tests/rpmpython.at
index c7ce1c0fd..7d0d6c680 100644
--- a/tests/rpmpython.at
+++ b/tests/rpmpython.at
@@ -127,7 +127,7 @@ for e in ts:
[foo-1.0-1.noarch]
)
-RPMPY_TEST([add bogus package to transaction],[
+RPMPY_TEST([add bogus package to transaction 1],[
ts = rpm.ts()
h = rpm.hdr()
h['name'] = "foo"
@@ -141,6 +141,27 @@ for e in ts:
[adding package to transaction failed]
)
+RPMPY_TEST([add bogus package to transaction 2],[
+ts = rpm.ts()
+h = rpm.hdr()
+h['name'] = 'foo'
+h['version'] = '1.0'
+h['release'] = '1'
+h['os'] = 'linux'
+h['arch'] = 'noarch'
+h['basenames'] = ['bing', 'bang', 'bong']
+h['dirnames'] = ['/opt' '/flopt']
+h['dirindexes'] = [ 1, 2, 3 ]
+try:
+ ts.addInstall(h, 'foo', 'u')
+except rpm.error, err:
+ myprint(err)
+for e in ts:
+ myprint(e.NEVRA())
+],
+[adding package to transaction failed]
+)
+
AT_SETUP([database iterators])
AT_KEYWORDS([python rpmdb])
AT_CHECK([