Add a basic testcase for bogus filename triplet detection

This commit is contained in:
Panu Matilainen 2012-01-28 18:03:42 +02:00
parent 502d07cf24
commit 79bfdd7e9c
1 changed files with 22 additions and 1 deletions

View File

@ -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([