forked from Mirror/pmbootstrap
testdata/APKBUILD.var-replacements: add custom var (MR 2300)
Extend the testdata and test case to show that the parser can now handle custom variables.
This commit is contained in:
parent
85ee201cf5
commit
105b5ec0bf
2 changed files with 3 additions and 2 deletions
|
@ -136,7 +136,7 @@ def test_variable_replacements():
|
|||
path = pmb_test.const.testdata + "/apkbuild/APKBUILD.variable-replacements"
|
||||
apkbuild = pmb.parse.apkbuild(path, check_pkgname=False)
|
||||
assert apkbuild["pkgdesc"] == "this should not affect variable replacement"
|
||||
assert apkbuild["url"] == "replacements variable string-replacements"
|
||||
assert apkbuild["url"] == "replacements variable string-replacements 1234"
|
||||
assert list(apkbuild["subpackages"].keys()) == ["replacements", "test"]
|
||||
|
||||
assert apkbuild["subpackages"]["replacements"] is None
|
||||
|
|
|
@ -3,7 +3,8 @@ pkgver="1.0.0"
|
|||
pkgrel=0
|
||||
arch="armhf"
|
||||
pkgdesc="$pkgdesc$pkgname test"
|
||||
url="${pkgname/variable-} ${pkgname/-replacements/} ${pkgname/variable/string}"
|
||||
_custom_var="1234" # this variable is not known to pmbootstrap
|
||||
url="${pkgname/variable-} ${pkgname/-replacements/} ${pkgname/variable/string} $_custom_var"
|
||||
subpackages="${pkgdesc#variable-}:test_subpkg_func"
|
||||
pkgdesc="this should not affect variable replacement"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue