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:
parent
09f9f24331
commit
b8d01dace8
18
test/pacman/tests/sync-nodepversion01.py
Normal file
18
test/pacman/tests/sync-nodepversion01.py
Normal 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
|
15
test/pacman/tests/sync-nodepversion02.py
Normal file
15
test/pacman/tests/sync-nodepversion02.py
Normal 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")
|
15
test/pacman/tests/sync-nodepversion03.py
Normal file
15
test/pacman/tests/sync-nodepversion03.py
Normal 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")
|
17
test/pacman/tests/sync-nodepversion04.py
Normal file
17
test/pacman/tests/sync-nodepversion04.py
Normal 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
|
19
test/pacman/tests/sync-nodepversion05.py
Normal file
19
test/pacman/tests/sync-nodepversion05.py
Normal 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")
|
19
test/pacman/tests/sync-nodepversion06.py
Normal file
19
test/pacman/tests/sync-nodepversion06.py
Normal 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")
|
Loading…
Reference in New Issue
Block a user