From 9a24f1ffc50deb7d979430ac85475b10b4a98d28 Mon Sep 17 00:00:00 2001 From: Benedikt Morbach Date: Sat, 11 Aug 2012 22:29:04 +1000 Subject: Add pactests for displaying optdep installation status Signed-off-by: Allan McRae --- test/pacman/tests/query010.py | 12 ++++++++++++ test/pacman/tests/query011.py | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/pacman/tests/query010.py create mode 100644 test/pacman/tests/query011.py diff --git a/test/pacman/tests/query010.py b/test/pacman/tests/query010.py new file mode 100644 index 00000000..76f82d9c --- /dev/null +++ b/test/pacman/tests/query010.py @@ -0,0 +1,12 @@ +self.description = "Query info on a package (optdep install status [uninstalled])" + +optstr = "dep: for foobar" + +pkg = pmpkg("dummy", "1.0-2") +pkg.optdepends = [optstr] +self.addpkg2db("local", pkg) + +self.args = "-Qi %s" % pkg.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=^Optional Deps.*%s$" % optstr) diff --git a/test/pacman/tests/query011.py b/test/pacman/tests/query011.py new file mode 100644 index 00000000..f487fb29 --- /dev/null +++ b/test/pacman/tests/query011.py @@ -0,0 +1,15 @@ +self.description = "Query info on a package (optdep install status [installed])" + +optstr = "dep: for foobar" + +pkg = pmpkg("dummy", "1.0-2") +pkg.optdepends = [optstr] +self.addpkg2db("local", pkg) + +dep = pmpkg("dep") +self.addpkg2db("local", dep) + +self.args = "-Qi %s" % pkg.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PACMAN_OUTPUT=^Optional Deps.*%s \[installed\]$" % optstr) -- cgit v1.2.3-70-g09d2