From: Alec Warner Date: Thu, 11 Jan 2007 20:59:53 +0000 (-0000) Subject: add some invalid ops to getcpv to make sure it returns the cpv still X-Git-Tag: v2.1.2~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eeda44059871c5d321a308c8d882ef62143a83e3;p=portage.git add some invalid ops to getcpv to make sure it returns the cpv still svn path=/main/trunk/; revision=5566 --- diff --git a/tests/portage_dep/test_dep_getcpv.py b/tests/portage_dep/test_dep_getcpv.py index 6928794a4..90e1b6e56 100644 --- a/tests/portage_dep/test_dep_getcpv.py +++ b/tests/portage_dep/test_dep_getcpv.py @@ -14,6 +14,8 @@ class DepGetCPV(TestCase): prefix_ops = ["<", ">", "=", "~", "!", "<=", ">=", "!=", "!<", "!>", "!~",""] + + bad_prefix_ops = [ ">~", "<~", "~>", "~<" ] postfix_ops = [ "*", "" ] cpvs = ["sys-apps/portage"] @@ -23,3 +25,7 @@ class DepGetCPV(TestCase): for postfix in postfix_ops: self.assertEqual( dep_getcpv( prefix + cpv + postfix ), cpv ) + for prefix in bad_prefix_ops: + for postfix in postfix_ops: + self.assertNotEqual( dep_getcpv( + prefix + cpv + postfix ), cpv )