Add tests to check that pacman recognizes -Qm and -Qn as valid options and -Qmn as an invalid option Signed-off-by: Chirantan Ekbote <chirantan.ekbote@gmail.com> --- test/pacman/tests/TESTS | 3 +++ test/pacman/tests/pacman006.py | 14 ++++++++++++++ test/pacman/tests/pacman007.py | 10 ++++++++++ test/pacman/tests/pacman008.py | 5 +++++ 4 files changed, 32 insertions(+) create mode 100644 test/pacman/tests/pacman006.py create mode 100644 test/pacman/tests/pacman007.py create mode 100644 test/pacman/tests/pacman008.py diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS index fc6a7e8..0a0457a 100644 --- a/test/pacman/tests/TESTS +++ b/test/pacman/tests/TESTS @@ -68,6 +68,9 @@ TESTS += test/pacman/tests/pacman002.py TESTS += test/pacman/tests/pacman003.py TESTS += test/pacman/tests/pacman004.py TESTS += test/pacman/tests/pacman005.py +TESTS += test/pacman/tests/pacman006.py +TESTS += test/pacman/tests/pacman007.py +TESTS += test/pacman/tests/pacman008.py TESTS += test/pacman/tests/provision001.py TESTS += test/pacman/tests/provision002.py TESTS += test/pacman/tests/provision003.py diff --git a/test/pacman/tests/pacman006.py b/test/pacman/tests/pacman006.py new file mode 100644 index 0000000..9a2ea92 --- /dev/null +++ b/test/pacman/tests/pacman006.py @@ -0,0 +1,14 @@ +self.description = "Test command line option (-Qm)" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) + +p2 = pmpkg("dummy") +p2.files = ["bin/dummy", + "usr/man/man1/dummy.1"] +self.addpkg2db("sync", p2) + +self.args = "-Qm" + +self.addrule("PACMAN_RETCODE=0") diff --git a/test/pacman/tests/pacman007.py b/test/pacman/tests/pacman007.py new file mode 100644 index 0000000..a8a2701 --- /dev/null +++ b/test/pacman/tests/pacman007.py @@ -0,0 +1,10 @@ +self.description = "Test command line option (-Qn)" + +p = pmpkg("foobar") +p.files = ["bin/foobar"] +self.addpkg2db("local", p) +self.addpkg2db("sync", p) + +self.args = "-Qn" + +self.addrule("PACMAN_RETCODE=0") diff --git a/test/pacman/tests/pacman008.py b/test/pacman/tests/pacman008.py new file mode 100644 index 0000000..589b2ba --- /dev/null +++ b/test/pacman/tests/pacman008.py @@ -0,0 +1,5 @@ +self.description = "Test invalid combination of command line options (-Qmn)" + +self.args = "-Qmn" + +self.addrule("PACMAN_RETCODE=1") -- 1.8.4.1