1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-17 14:55:07 -05:00
pacman/test/pacman/tests/scriptlet002.py
Dan McGee 7480df68ce Rework scriptlet tests to not depend on pacman output
This actually does something in a scriptlet we can check with our normal
set of rules, rather than relying on pacman debug output.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 07:48:59 -05:00

18 lines
470 B
Python

self.description = "Scriptlet test (pre/post remove)"
p1 = pmpkg("dummy")
p1.files = ['etc/dummy.conf']
p1.install['pre_remove'] = "echo foobar > pre_remove"
p1.install['post_remove'] = "echo foobar > post_remove"
self.addpkg2db("local", p1)
self.args = "-R %s" % p1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("FILE_EXIST=pre_remove")
self.addrule("FILE_EXIST=post_remove")
fakechroot = util.which("fakechroot")
if not fakechroot:
self.expectfailure = True