Parse multiline Android properties

This commit is contained in:
Janik Besendorf
2026-08-25 19:19:47 +02:00
parent fd27fe3378
commit 65df483258
2 changed files with 26 additions and 12 deletions
+17
View File
@@ -48,3 +48,20 @@ class TestGetPropArtifact:
{"name": "empty", "value": ""},
{"name": "valid", "value": "value"},
]
def test_multiline_value(self):
gp = GetProp()
gp.parse(
"[persist.sys.boot.reason.history]: ["
"reboot,ota,1697044974\n"
"reboot,watchdog,1696958574]\n"
"[ro.build.version.sdk]: [35]\n"
)
assert gp.results == [
{
"name": "persist.sys.boot.reason.history",
"value": "reboot,ota,1697044974\nreboot,watchdog,1696958574",
},
{"name": "ro.build.version.sdk", "value": "35"},
]