From: Panu Matilainen Date: Fri, 1 Jul 2011 09:33:55 +0000 (+0300) Subject: Add a simple and stupid test case for python spec parse X-Git-Tag: tznext/4.11.0.1.tizen20130304~987 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3464e60aa8635b63213e65724e19d263b9c6645d;p=tools%2Flibrpm-tizen.git Add a simple and stupid test case for python spec parse --- diff --git a/tests/rpmpython.at b/tests/rpmpython.at index 89002b1..01fd722 100644 --- a/tests/rpmpython.at +++ b/tests/rpmpython.at @@ -56,6 +56,21 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'gzdio' ]: ], []) +RPMPY_TEST([spec parse],[ +# TODO: add a better test spec with sub-packages etc +spec = rpm.spec('${RPMDATA}/SPECS/hello.spec') +for (name, num, flags) in spec.sources: + myprint('src %s %d %d' % (name, num, flags)) +for pkg in spec.packages: + myprint(pkg.header.format('%{nvr}')) +myprint(spec.sourceHeader.format('%{nvr}')) +], +[src hello-1.0-modernize.patch 0 2 +src hello-1.0.tar.gz 0 1 +hello-1.0-1 +hello-1.0-1 +]) + RPMPY_TEST([basic header manipulation],[ h = rpm.hdr() h['name'] = 'testpkg'