summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/rpmpython.at19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/rpmpython.at b/tests/rpmpython.at
index 7d0d6c680..1ccbb7070 100644
--- a/tests/rpmpython.at
+++ b/tests/rpmpython.at
@@ -107,6 +107,25 @@ None
'rpm.hdr' object has no attribute '__foo__']
)
+RPMPY_TEST([invalid header data],[
+h1 = rpm.hdr()
+h1['basenames'] = ['bing', 'bang', 'bong']
+h1['dirnames'] = ['/opt/', '/flopt/']
+h1['dirindexes'] = [ 1, 0, 3 ]
+h2 = rpm.hdr()
+h2['basenames'] = ['bing', 'bang', 'bong']
+h2['dirnames'] = ['/opt/', '/flopt/']
+h2['dirindexes'] = [ 0, 0, 1 ]
+for h in [h1, h2]:
+ try:
+ myprint(','.join(h['filenames']))
+ except rpm.error, exc:
+ myprint(exc)
+],
+[invalid header data
+/opt/bing,/opt/bang,/flopt/bong]
+)
+
RPMPY_TEST([reading a package file],[
ts = rpm.ts()
h = ts.hdrFromFdno('${RPMDATA}/RPMS/hello-1.0-1.ppc64.rpm')