diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-02-21 16:51:08 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-02-21 16:56:48 +0200 |
commit | 2a4333c18e0000031ed1d542ba7a6fffe1360c08 (patch) | |
tree | 6f9909fef1da50acf3b3f8559b36cf5a7487b1a2 /tests | |
parent | de942fba1cb7b1873e8813732f12a5475965c2ff (diff) | |
download | rpm-2a4333c18e0000031ed1d542ba7a6fffe1360c08.tar.gz rpm-2a4333c18e0000031ed1d542ba7a6fffe1360c08.tar.bz2 rpm-2a4333c18e0000031ed1d542ba7a6fffe1360c08.zip |
Add a testcase for tag extension bad file name triplet detection
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rpmpython.at | 19 |
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') |