diff --git a/test/test_questions.py b/test/test_questions.py index 2574a84e..d600004c 100644 --- a/test/test_questions.py +++ b/test/test_questions.py @@ -223,6 +223,17 @@ def test_questions_ui(args, monkeypatch): assert pmb.config.init.ask_for_ui(args) == "weston" +def test_questions_ui_extras(args, monkeypatch): + args.aports = pmb_test.const.testdata + "/init_questions_device/aports" + assert not pmb.config.init.ask_for_ui_extras(args, "none") + + fake_answers(monkeypatch, ["n"]) + assert not pmb.config.init.ask_for_ui_extras(args, "weston") + + fake_answers(monkeypatch, ["y"]) + assert pmb.config.init.ask_for_ui_extras(args, "weston") + + def test_questions_work_path(args, monkeypatch, tmpdir): # Existing paths (triggering various errors) func = pmb.config.init.ask_for_work_path diff --git a/test/testdata/init_questions_device/aports/main/postmarketos-ui-weston/APKBUILD b/test/testdata/init_questions_device/aports/main/postmarketos-ui-weston/APKBUILD index b366af2f..fd02f16f 100644 --- a/test/testdata/init_questions_device/aports/main/postmarketos-ui-weston/APKBUILD +++ b/test/testdata/init_questions_device/aports/main/postmarketos-ui-weston/APKBUILD @@ -5,7 +5,12 @@ pkgdesc="(Wayland) Reference compositor (demo, not a phone interface)" url="https://postmarketos.org" arch="noarch" license="GPL-3.0-or-later" +subpackages="$pkgname-extras" package() { mkdir "$pkgdir" } + +extras() { + pkgdesc="Super cool extras you will definitely (not?) need" +}