aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ebuild/test_domain.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/ebuild/test_domain.py b/tests/ebuild/test_domain.py
index 6629cfb9..87c3d489 100644
--- a/tests/ebuild/test_domain.py
+++ b/tests/ebuild/test_domain.py
@@ -1,3 +1,4 @@
+import textwrap
from unittest import mock
import pytest
@@ -54,3 +55,30 @@ class TestDomain:
(packages.AlwaysTrue, ((), ("X",))),
(packages.AlwaysTrue, (("X",), ("Y",))),
) == self.mk_domain().pkg_use
+
+ def test_use_expand_syntax(self):
+ puse = self.confdir / "package.use"
+ puse.mkdir()
+ open(puse / "a", "w").write(
+ textwrap.dedent(
+ """
+ */* x_y1
+ # unrelated is there to verify that it's unaffected by the USE_EXPAND
+ */* unrelated X: -y1 y2
+ """
+ )
+ )
+
+ assert (
+ (packages.AlwaysTrue, ((), ("x_y1",))),
+ (
+ packages.AlwaysTrue,
+ (
+ ("x_y1",),
+ (
+ "unrelated",
+ "x_y2",
+ ),
+ ),
+ ),
+ ) == self.mk_domain().pkg_use