mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-08 19:23:38 +00:00
feat: drop explicit makepkg usage (#134)
* generate filenames without using makepkg * pkgbuild parser impl * completely remove makepkg calls * simplify typed get * try to improve parser * docs and recipes updatte * never raise keyerror instead return empty string * udpate tests * add support of array expansion * docs update * tests update * handle quoted control sequences correctly * expand bash * allow packages without package function * docs update * add moroe tests * small improovements * support escaped arrays and functions
This commit is contained in:
@@ -132,6 +132,14 @@ def test_serialize_list() -> None:
|
||||
assert PkgbuildPatch("key", ["val'ue", "val\"ue2"]).serialize() == """key=('val'"'"'ue' 'val"ue2')"""
|
||||
|
||||
|
||||
def test_substitute() -> None:
|
||||
"""
|
||||
must correctly substitute variables
|
||||
"""
|
||||
assert PkgbuildPatch("key", "$env $value").substitute({"env": "variable"}) == "variable $value"
|
||||
assert PkgbuildPatch("key", ["$env $value"]).substitute({"env": "variable"}) == ["variable $value"]
|
||||
|
||||
|
||||
def test_write(mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must write serialized value to the file
|
||||
|
||||
Reference in New Issue
Block a user