All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/utils: Add test for explode_dep_versions2
@ 2012-10-02  0:08 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-10-02  0:08 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/tests/utils.py b/bitbake/lib/bb/tests/utils.py
index 04e8d5d..9f60491 100644
--- a/bitbake/lib/bb/tests/utils.py
+++ b/bitbake/lib/bb/tests/utils.py
@@ -34,3 +34,18 @@ class VerCmpString(unittest.TestCase):
         result = bb.utils.vercmp_string('1.1', '1_p2')
         self.assertTrue(result < 0)
 
+    def test_explode_dep_versions(self):
+        correctresult = {"foo" : ["= 1.10"]}
+        result = bb.utils.explode_dep_versions2("foo (= 1.10)")
+        self.assertEqual(result, correctresult)
+        result = bb.utils.explode_dep_versions2("foo (=1.10)")
+        self.assertEqual(result, correctresult)
+        result = bb.utils.explode_dep_versions2("foo ( = 1.10)")
+        self.assertEqual(result, correctresult)
+        result = bb.utils.explode_dep_versions2("foo ( =1.10)")
+        self.assertEqual(result, correctresult)
+        result = bb.utils.explode_dep_versions2("foo ( = 1.10 )")
+        self.assertEqual(result, correctresult)
+        result = bb.utils.explode_dep_versions2("foo ( =1.10 )")
+        self.assertEqual(result, correctresult)
+





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-02  0:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02  0:08 [PATCH] tests/utils: Add test for explode_dep_versions2 Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.