summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/dep/test_paren_reduce.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/tests/dep/test_paren_reduce.py')
-rw-r--r--pym/portage/tests/dep/test_paren_reduce.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/pym/portage/tests/dep/test_paren_reduce.py b/pym/portage/tests/dep/test_paren_reduce.py
index 3277ab58b..bd5f42584 100644
--- a/pym/portage/tests/dep/test_paren_reduce.py
+++ b/pym/portage/tests/dep/test_paren_reduce.py
@@ -11,12 +11,23 @@ class TestParenReduce(TestCase):
test_cases = (
( "A", ["A"]),
- ( "( A )", [["A"]]),
+ ( "( A )", ["A"]),
( "|| ( A B )", [ "||", ["A", "B"] ]),
( "|| ( A || ( B C ) )", [ "||", ["A", "||", ["B", "C"]]]),
( "|| ( A || ( B C D ) )", [ "||", ["A", "||", ["B", "C", "D"]] ]),
( "|| ( A || ( B || ( C D ) E ) )", [ "||", ["A", "||", ["B", "||", ["C", "D"], "E"]] ]),
( "a? ( A )", ["a?", ["A"]]),
+
+ ( "( || ( ( ( A ) B ) ) )", [ "||", ["A", "B"] ]),
+ ( "( || ( || ( ( A ) B ) ) )", [ "||", ["A", "B"] ]),
+ ( "( || ( || ( ( A ) B ) ) )", [ "||", ["A", "B"] ]),
+ ( "|| ( A )", ["A"]),
+ ( "( || ( || ( || ( A ) foo? ( B ) ) ) )", [ "||", ["A", "foo?", ["B"] ]]),
+ ( "( || ( || ( bar? ( A ) || ( foo? ( B ) ) ) ) )", [ "||", ["bar?", ["A"], "foo?", ["B"] ]]),
+ ( "A || ( ) foo? ( ) B", ["A", "B"]),
+
+ ( "|| ( A ) || ( B )", ["A", "B"]),
+ ( "foo? ( A ) foo? ( B )", ["foo?", ["A"], "foo?", ["B"]]),
)
test_cases_xfail = (
@@ -36,6 +47,9 @@ class TestParenReduce(TestCase):
"|| ( A B || )",
"a? A",
+
+ ( "( || ( || || ( A ) foo? ( B ) ) )"),
+ ( "( || ( || bar? ( A ) foo? ( B ) ) )"),
)
for dep_str, expected_result in test_cases: