summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/dep
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-10-15 15:01:57 +0200
committerZac Medico <zmedico@gentoo.org>2010-10-15 06:15:30 -0700
commitc75d57003f4297ccfeebfdc341715ddb2a5888a0 (patch)
tree661e0f187f4a1a1e029053d5d29cd71541a2df59 /pym/portage/tests/dep
parent800cac59556d78af8a96c9bd266d33bb28ee9c0c (diff)
downloadportage-c75d57003f4297ccfeebfdc341715ddb2a5888a0.tar.gz
portage-c75d57003f4297ccfeebfdc341715ddb2a5888a0.tar.bz2
portage-c75d57003f4297ccfeebfdc341715ddb2a5888a0.zip
use_reduce: Next try on full reduction
Diffstat (limited to 'pym/portage/tests/dep')
-rw-r--r--pym/portage/tests/dep/test_use_reduce.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/pym/portage/tests/dep/test_use_reduce.py b/pym/portage/tests/dep/test_use_reduce.py
index f7e9b1012..7c7286ad8 100644
--- a/pym/portage/tests/dep/test_use_reduce.py
+++ b/pym/portage/tests/dep/test_use_reduce.py
@@ -321,7 +321,7 @@ class UseReduce(TestCase):
"A foo? ( || ( B || ( bar? ( || ( C D E ) ) !bar? ( F ) ) ) ) G",
uselist = ["foo", "bar"],
opconvert = True,
- expected_result = ['A', ['||', 'B', ['||', 'C', 'D', 'E']], 'G']),
+ expected_result = ['A', ['||', 'B', 'C', 'D', 'E'], 'G']),
UseReduceTestCase(
"A foo? ( || ( B || ( bar? ( || ( C D E ) ) !bar? ( F ) ) ) ) G",
uselist = ["foo", "bar"],
@@ -376,7 +376,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 ) ) )",
@@ -393,6 +393,11 @@ class UseReduce(TestCase):
expected_result = ['||', [['A', 'B'], 'C', 'D', 'E', ['F', 'G'], 'H']]),
UseReduceTestCase(
+ "|| ( ( A B ) || ( C D || ( E ( F G ) || ( H ) ) ) )",
+ opconvert = True,
+ expected_result = [['||', ['A', 'B'], 'C', 'D', 'E', ['F', 'G'], 'H']]),
+
+ UseReduceTestCase(
"|| ( foo? ( A B ) )",
uselist = ["foo"],
expected_result = ['A', 'B']),
@@ -419,7 +424,13 @@ class UseReduce(TestCase):
UseReduceTestCase(
"|| ( ( A B ) || ( foo? ( bar? ( ( C D || ( baz? ( E ) ( F G ) || ( H ) ) ) ) ) ) )",
uselist = ["foo", "bar", "baz"],
- expected_result = ['||', [['A', 'B'], 'C', 'D', '||', ['E', ['F', 'G'], 'H']]]),
+ expected_result = ['||', [['A', 'B'], ['C', 'D', '||', ['E', ['F', 'G'], 'H']]]]),
+
+ UseReduceTestCase(
+ "|| ( ( A B ) || ( foo? ( bar? ( ( C D || ( baz? ( E ) ( F G ) || ( H ) ) ) ) ) ) )",
+ uselist = ["foo", "bar", "baz"],
+ opconvert = True,
+ expected_result = [['||', ['A', 'B'], ['C', 'D', ['||', 'E', ['F', 'G'], 'H']]]]),
UseReduceTestCase(
"|| ( foo? ( A B ) )",