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

add pactests for -Sdd

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Xavier Chantry 2010-10-10 19:51:07 +02:00 committed by Dan McGee
parent 09f9f24331
commit b8d01dace8
6 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,18 @@
self.description = "nodepversion: -Sdd works"
p1 = pmpkg("pkg1", "1.0-2")
p1.depends = ["provision>1.0-1"]
self.addpkg2db("sync", p1)
p2 = pmpkg("pkg2", "1.0-2")
p2.provides = ["provision=1.0-1"]
self.addpkg2db("sync", p2)
self.args = "-Sdd %s" % p1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_DEPENDS=pkg1|provision>1.0-1")
self.expectfailure = True

View File

@ -0,0 +1,15 @@
self.description = "nodepversion: -S fails"
p1 = pmpkg("pkg1", "1.0-2")
p1.depends = ["provision>=1.0-2"]
self.addpkg2db("sync", p1)
p2 = pmpkg("pkg2", "1.0-2")
p2.provides = ["provision=1.0-1"]
self.addpkg2db("sync", p2)
self.args = "-S %s" % p1.name
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")

View File

@ -0,0 +1,15 @@
self.description = "nodepversion: -Sd works but no deps"
p1 = pmpkg("pkg1", "1.0-2")
p1.depends = ["provision>=1.0-2"]
self.addpkg2db("sync", p1)
p2 = pmpkg("pkg2", "1.0-2")
p2.provides = ["provision=1.0-1"]
self.addpkg2db("sync", p2)
self.args = "-Sd %s" % p1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")

View File

@ -0,0 +1,17 @@
self.description = "nodepversion: provision does not exist"
p1 = pmpkg("pkg1", "1.0-2")
p1.depends = ["invalid>=1.0-2"]
self.addpkg2db("sync", p1)
p2 = pmpkg("pkg2", "1.0-2")
p2.provides = ["provision=1.0-1"]
self.addpkg2db("sync", p2)
self.args = "-Sdd %s" % p1.name
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
self.expectfailure = True

View File

@ -0,0 +1,19 @@
self.description = "nodepversion: -Sudd works"
p1 = pmpkg("pkg1", "1.0-1")
p1.depends = ["provision=1.0"]
self.addpkg2db("local", p1)
p2 = pmpkg("pkg2", "1.0-1")
p2.provides = ["provision=1.0"]
self.addpkg2db("local", p2)
sp2 = pmpkg("pkg2", "1.1-1")
sp2.provides = ["provision=1.1"]
self.addpkg2db("sync", sp2)
self.args = "-Sudd"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=pkg1|1.0-1")
self.addrule("PKG_VERSION=pkg2|1.1-1")

View File

@ -0,0 +1,19 @@
self.description = "nodepversion: -Su fails"
p1 = pmpkg("pkg1", "1.0-1")
p1.depends = ["provision=1.0"]
self.addpkg2db("local", p1)
p2 = pmpkg("pkg2", "1.0-1")
p2.provides = ["provision=1.0"]
self.addpkg2db("local", p2)
sp2 = pmpkg("pkg2", "1.1-1")
sp2.provides = ["provision=1.1"]
self.addpkg2db("sync", sp2)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_VERSION=pkg1|1.0-1")
self.addrule("PKG_VERSION=pkg2|1.0-1")