index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2007-12-02 17:56:48 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-12-02 17:56:48 -0600 |
commit | e8eff3ef97e30ec64fbb62e502ed24fe5baceca0 (patch) | |
tree | 66851e2e63aba2c3c6781789834b3c84bdaa6d34 | |
parent | 0b6d73a5b4931519ee40646aa9093148f4571cf0 (diff) |
-rw-r--r-- | pactest/tests/deptest001.py | 20 | ||||
-rw-r--r-- | pactest/tests/query001.py | 2 | ||||
-rw-r--r-- | pactest/tests/query002.py | 10 | ||||
-rw-r--r-- | pactest/tests/query003.py | 10 | ||||
-rw-r--r-- | pactest/tests/query004.py | 10 | ||||
-rw-r--r-- | pactest/tests/sync1100.py | 11 | ||||
-rw-r--r-- | pactest/tests/sync1101.py | 11 | ||||
-rw-r--r-- | pactest/tests/sync1102.py | 12 | ||||
-rw-r--r-- | pactest/tests/sync1103.py | 11 |
diff --git a/pactest/tests/deptest001.py b/pactest/tests/deptest001.py new file mode 100644 index 00000000..db0b7684 --- /dev/null +++ b/pactest/tests/deptest001.py @@ -0,0 +1,20 @@ +self.description = "test deptest (-T) functionality" + +sp1 = pmpkg("pkg1") +sp1.depends = ["dep"] +self.addpkg2db("sync", sp1) + +sp1dep = pmpkg("dep") +self.addpkg2db("sync", sp1dep) + +sp2 = pmpkg("pkg2") +self.addpkg2db("sync", sp2) + +lp2 = pmpkg("pkg2") +self.addpkg2db("local", lp2) + +self.args = "-T pkg1 pkg2" + +self.addrule("PACMAN_RETCODE=127") +self.addrule("PACMAN_OUTPUT=pkg1") +self.addrule("!PACMAN_OUTPUT=pkg2") diff --git a/pactest/tests/query001.py b/pactest/tests/query001.py index 315af84a..8faf0e15 100644 --- a/pactest/tests/query001.py +++ b/pactest/tests/query001.py @@ -7,4 +7,4 @@ self.addpkg2db("local", p) self.args = "-Q %s" % p.name self.addrule("PACMAN_RETCODE=0") -self.addrule("PACMAN_OUTPUT=foobar") +self.addrule("PACMAN_OUTPUT=%s" % p.name) diff --git a/pactest/tests/query002.py b/pactest/tests/query002.py new file mode 100644 index 00000000..830936b4 --- /dev/null +++ b/pactest/tests/query002.py @@ -0,0 +1,10 @@ +self.description = "Query info on a package" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +self.args = "-Qi %s" % p.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=%s" % p.name) diff --git a/pactest/tests/query003.py b/pactest/tests/query003.py new file mode 100644 index 00000000..ea113081 --- /dev/null +++ b/pactest/tests/query003.py @@ -0,0 +1,10 @@ +self.description = "Query search for a package" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +self.args = "-Qs %s" % p.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=%s" % p.name) diff --git a/pactest/tests/query004.py b/pactest/tests/query004.py new file mode 100644 index 00000000..8faf0e15 --- /dev/null +++ b/pactest/tests/query004.py @@ -0,0 +1,10 @@ +self.description = "Query a package" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +self.args = "-Q %s" % p.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=%s" % p.name) diff --git a/pactest/tests/sync1100.py b/pactest/tests/sync1100.py new file mode 100644 index 00000000..1f8fa057 --- /dev/null +++ b/pactest/tests/sync1100.py @@ -0,0 +1,11 @@ +self.description = "Get info on package from a sync db" + +sp = pmpkg("dummy") +sp.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +self.addpkg2db("sync", sp) + +self.args = "-Si %s" % sp.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=%s" % sp.name) diff --git a/pactest/tests/sync1101.py b/pactest/tests/sync1101.py new file mode 100644 index 00000000..ba2ad44f --- /dev/null +++ b/pactest/tests/sync1101.py @@ -0,0 +1,11 @@ +self.description = "Search for package from a sync db" + +sp = pmpkg("dummy") +sp.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +self.addpkg2db("sync", sp) + +self.args = "-Ss %s" % sp.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=%s" % sp.name) diff --git a/pactest/tests/sync1102.py b/pactest/tests/sync1102.py new file mode 100644 index 00000000..3a27238f --- /dev/null +++ b/pactest/tests/sync1102.py @@ -0,0 +1,12 @@ +self.description = "Get URL on package from a sync db" + +sp = pmpkg("dummy") +sp.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +self.addpkg2db("sync", sp) + +self.args = "-Sp %s" % sp.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=%s" % sp.name) +self.addrule("PACMAN_OUTPUT=file://") diff --git a/pactest/tests/sync1103.py b/pactest/tests/sync1103.py new file mode 100644 index 00000000..052c7236 --- /dev/null +++ b/pactest/tests/sync1103.py @@ -0,0 +1,11 @@ +self.description = "Get package list from sync dbs" + +sp = pmpkg("dummy") +sp.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +self.addpkg2db("sync", sp) + +self.args = "-Sl" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=%s" % sp.name) |