mirror of
https://github.com/mvt-project/mvt.git
synced 2026-09-21 00:40:43 +02:00
End a settings record at a blank line
dumpsys prints a blank line after every namespace block and after a change history, and the generation registry and any vendor dumps follow the last block before the section trailer. A record ran until the next `_id:` line, heading or trailer, so the last row of the section absorbed those dumps into whichever field came last. A blank line now closes the record being read; lines that follow it without an `_id:` are skipped until the next row or heading. The fixture carries a generation registry after its last block, modelled on the AOSP dump, and the last row is pinned to exactly its own fields.
This commit is contained in:
@@ -87,6 +87,20 @@ class TestSettingsArtifact:
|
||||
assert record["value"] == "1"
|
||||
assert record["isValuePreservedInRestore"] == "false"
|
||||
|
||||
def test_dumps_after_the_last_block_are_not_part_of_the_last_row(self):
|
||||
settings = parse_bugreport_settings()
|
||||
|
||||
assert settings.results[-1] == {
|
||||
"namespace": "secure",
|
||||
"user": "10",
|
||||
"_id": "311",
|
||||
"name": "accessibility_enabled",
|
||||
"pkg": "android",
|
||||
"value": "0",
|
||||
"tag": "null",
|
||||
"history": [],
|
||||
}
|
||||
|
||||
def test_repeated_names_are_kept_as_separate_records(self):
|
||||
settings = parse_bugreport_settings()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user