1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Add two pactests with non-trivial file counts

These are probably useful anyway, but also exposed the double file list bug
that will be fixed in a later commit.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-01-11 18:44:26 -06:00
parent 0d4dd09993
commit b04a56dbe9
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,12 @@
self.description = "Remove a package with several files"
p = pmpkg("foo")
p.files = ["usr/share/file_%d" % n for n in range(1000)]
self.addpkg2db("local", p)
self.args = "-R %s" % p.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=foo")
self.addrule("!FILE_EXIST=usr/share/file_0")
self.addrule("!FILE_EXIST=usr/share/file_999")

View File

@ -0,0 +1,18 @@
self.description = "Upgrade a package with several files"
lp = pmpkg("dummy")
lp.files = ["usr/share/file_%d" % n for n in range(250, 750)]
self.addpkg2db("local", lp)
p = pmpkg("dummy", "1.1-1")
p.files = ["usr/share/file_%d" % n for n in range(600, 1000)]
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.1-1")
self.addrule("!FILE_EXIST=usr/share/file_250")
self.addrule("!FILE_EXIST=usr/share/file_599")
self.addrule("FILE_EXIST=usr/share/file_600")
self.addrule("FILE_EXIST=usr/share/file_999")