summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/utils.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-01 22:06:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-02 11:40:54 +0100
commitd3529e2fab3ab143737863400558f1061bbeb105 (patch)
tree86f2e7ced117673081ef979452708fe2aa611950 /bitbake/lib/bb/tests/utils.py
parentc4d857debf35c9aa98b6db5605365a900dea7370 (diff)
downloadpoky-d3529e2fab3ab143737863400558f1061bbeb105.tar.gz
bitbake: tests/utils: Add test for explode_dep_versions2
(Bitbake rev: b1b0aabfab3c94c3b515070d0fb4d7819e2548bc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/utils.py')
-rw-r--r--bitbake/lib/bb/tests/utils.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/utils.py b/bitbake/lib/bb/tests/utils.py
index 04e8d5d4d2..9f60491b35 100644
--- a/bitbake/lib/bb/tests/utils.py
+++ b/bitbake/lib/bb/tests/utils.py
@@ -34,3 +34,18 @@ class VerCmpString(unittest.TestCase):
34 result = bb.utils.vercmp_string('1.1', '1_p2') 34 result = bb.utils.vercmp_string('1.1', '1_p2')
35 self.assertTrue(result < 0) 35 self.assertTrue(result < 0)
36 36
37 def test_explode_dep_versions(self):
38 correctresult = {"foo" : ["= 1.10"]}
39 result = bb.utils.explode_dep_versions2("foo (= 1.10)")
40 self.assertEqual(result, correctresult)
41 result = bb.utils.explode_dep_versions2("foo (=1.10)")
42 self.assertEqual(result, correctresult)
43 result = bb.utils.explode_dep_versions2("foo ( = 1.10)")
44 self.assertEqual(result, correctresult)
45 result = bb.utils.explode_dep_versions2("foo ( =1.10)")
46 self.assertEqual(result, correctresult)
47 result = bb.utils.explode_dep_versions2("foo ( = 1.10 )")
48 self.assertEqual(result, correctresult)
49 result = bb.utils.explode_dep_versions2("foo ( =1.10 )")
50 self.assertEqual(result, correctresult)
51