add some invalid ops to getcpv to make sure it returns the cpv still
authorAlec Warner <antarus@gentoo.org>
Thu, 11 Jan 2007 20:59:53 +0000 (20:59 -0000)
committerAlec Warner <antarus@gentoo.org>
Thu, 11 Jan 2007 20:59:53 +0000 (20:59 -0000)
svn path=/main/trunk/; revision=5566

tests/portage_dep/test_dep_getcpv.py

index 6928794a4728cad7c248b342f48ea1f311b6f61e..90e1b6e56bc30524b68f320e4a84e18233ad8210 100644 (file)
@@ -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 )