summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-02-21 16:51:08 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-02-21 16:56:48 +0200
commit2a4333c18e0000031ed1d542ba7a6fffe1360c08 (patch)
tree6f9909fef1da50acf3b3f8559b36cf5a7487b1a2 /tests
parentde942fba1cb7b1873e8813732f12a5475965c2ff (diff)
downloadlibrpm-tizen-2a4333c18e0000031ed1d542ba7a6fffe1360c08.tar.gz
librpm-tizen-2a4333c18e0000031ed1d542ba7a6fffe1360c08.tar.bz2
librpm-tizen-2a4333c18e0000031ed1d542ba7a6fffe1360c08.zip
Add a testcase for tag extension bad file name triplet detection
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')