summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/dep
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-15 02:09:16 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-15 02:09:16 -0700
commit32092a07dc506df221382ca49faba420c776f6f1 (patch)
treeaf34db3ffca0472d7245070ef18a9fd796be7688 /pym/portage/tests/dep
parentf860e43d85e08a85cd189dbdbcae4bd87b990682 (diff)
downloadportage-32092a07dc506df221382ca49faba420c776f6f1.tar.gz
portage-32092a07dc506df221382ca49faba420c776f6f1.tar.bz2
portage-32092a07dc506df221382ca49faba420c776f6f1.zip
Fix use_reduce + opconvert of "|| ( A B ) C".
Also, tweak other test results to match the additional brackets that this change introduces in some cases.
Diffstat (limited to 'pym/portage/tests/dep')
-rw-r--r--pym/portage/tests/dep/test_use_reduce.py26
1 files changed, 10 insertions, 16 deletions
diff --git a/pym/portage/tests/dep/test_use_reduce.py b/pym/portage/tests/dep/test_use_reduce.py
index b9a2b3dd3..162d7cdf2 100644
--- a/pym/portage/tests/dep/test_use_reduce.py
+++ b/pym/portage/tests/dep/test_use_reduce.py
@@ -276,19 +276,19 @@ class UseReduce(TestCase):
UseReduceTestCase(
"|| ( A B )",
opconvert = True,
- expected_result = ["||", "A", "B"]),
+ expected_result = [['||', 'A', 'B']]),
UseReduceTestCase(
"|| ( ( A B ) C )",
opconvert = True,
- expected_result = [ "||", ["A", "B"], "C" ]),
+ expected_result = [['||', ['A', 'B'], 'C']]),
UseReduceTestCase(
"|| ( A || ( B C ) )",
opconvert = True,
- expected_result = ["||", "A", "B", "C"]),
+ expected_result = [['||', 'A', 'B', 'C']]),
UseReduceTestCase(
"|| ( A || ( B C D ) )",
opconvert = True,
- expected_result = ["||", "A", "B", "C", "D"]),
+ expected_result = [['||', 'A', 'B', 'C', 'D']]),
UseReduceTestCase(
"|| ( A || ( B || ( C D ) E ) )",
expected_result = [ "||", ["A", "B", "C", "D", "E"] ]),
@@ -299,17 +299,11 @@ class UseReduce(TestCase):
UseReduceTestCase(
"( || ( || ( ( A ) B ) ) )",
opconvert = True,
- expected_result = ["||", "A", "B"]),
+ expected_result = [['||', 'A', 'B']]),
UseReduceTestCase(
- "( || ( || ( ( A ) B ) ) )",
+ "|| ( A B ) C",
opconvert = True,
- expected_result = ["||", "A", "B"]),
-
- # ['||', 'A', 'B', 'C'] != [['||', 'A', 'B'], 'C']
- #UseReduceTestCase(
- # "|| ( A B ) C",
- # opconvert = True,
- # expected_result = [['||', 'A', 'B'], 'C']),
+ expected_result = [['||', 'A', 'B'], 'C']),
# ['A', '||', ['B', 'C']] != ['A', ['||', 'B', 'C']]
#UseReduceTestCase(
@@ -328,7 +322,7 @@ class UseReduce(TestCase):
"( || ( || ( || ( A ) foo? ( B ) ) ) )",
uselist = ["foo"],
opconvert = True,
- expected_result = ["||", "A", "B"]),
+ expected_result = [['||', 'A', 'B']]),
UseReduceTestCase(
"( || ( || ( bar? ( A ) || ( foo? ( B ) ) ) ) )",
opconvert = True,
@@ -337,7 +331,7 @@ class UseReduce(TestCase):
"( || ( || ( bar? ( A ) || ( foo? ( B ) ) ) ) )",
uselist = ["foo", "bar"],
opconvert = True,
- expected_result = ["||", "A", "B"]),
+ expected_result = [['||', 'A', 'B']]),
UseReduceTestCase(
"A || ( ) foo? ( ) B",
opconvert = True,
@@ -365,7 +359,7 @@ class UseReduce(TestCase):
"|| ( ( A B ) foo? ( || ( C D ) ) )",
uselist = ["foo"],
opconvert = True,
- expected_result = ['||', ['A', 'B'], 'C', 'D']),
+ expected_result = [['||', ['A', 'B'], '||', 'C', 'D']]),
UseReduceTestCase(
"|| ( ( A B ) foo? ( || ( C D ) ) )",