Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=175271a78f2d4cabc7a9c01f96092570d646fd8f
commit 175271a78f2d4cabc7a9c01f96092570d646fd8f Author: Michel Hermier <[email protected]> Date: Thu Dec 26 21:59:58 2013 +0100 pactest: Add additionnal query checks. diff --git a/pactest/tests/query001.py b/pactest/tests/query001.py index fe68910..d8ad451 100644 --- a/pactest/tests/query001.py +++ b/pactest/tests/query001.py @@ -6,4 +6,4 @@ self.addpkg2db("local", p) self.args = "-Q foobar" -self.addrule("PACMAN_OUTPUT=foobar") +self.addrule("PACMAN_RETCODE=0") diff --git a/pactest/tests/query002.py b/pactest/tests/query002.py new file mode 100644 index 0000000..f11b66c --- /dev/null +++ b/pactest/tests/query002.py @@ -0,0 +1,9 @@ +self.description = "Query an invalid package" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +self.args = "-Q foobaz" + +self.addrule("!PACMAN_RETCODE=0") diff --git a/pactest/tests/query003.py b/pactest/tests/query003.py new file mode 100644 index 0000000..213bc4a --- /dev/null +++ b/pactest/tests/query003.py @@ -0,0 +1,9 @@ +self.description = "Query search an invalid package" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +self.args = "-Qs foobaz" + +self.addrule("!PACMAN_RETCODE=0") diff --git a/pactest/tests/query004.py b/pactest/tests/query004.py new file mode 100644 index 0000000..9ea1d1d --- /dev/null +++ b/pactest/tests/query004.py @@ -0,0 +1,9 @@ +self.description = "Query search a package ignoring case" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +self.args = "-Qs FoObAr" + +self.addrule("PACMAN_RETCODE=0") diff --git a/pactest/tests/query005.py b/pactest/tests/query005.py new file mode 100644 index 0000000..53dd33f --- /dev/null +++ b/pactest/tests/query005.py @@ -0,0 +1,9 @@ +self.description = "Query search a package ignoring case with a partial match" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +self.args = "-Qs Oba" + +self.addrule("PACMAN_RETCODE=0") _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
