mirror of
https://github.com/mvt-project/mvt.git
synced 2026-10-02 14:09:47 +02:00
test: cover mixed ADB state line endings
Regression for CRLF after the manager brace and LF after the outer brace.
This commit is contained in:
1 parent
8c5278f540
commit
f1e52b297a
1 file changed
+23
@@ -143,6 +143,29 @@ class TestDumpsysADBArtifact:
|
||||
assert da_adb.results[0]["keystore"][0]["last_connected"] == "1628501829898"
|
||||
|
||||
|
||||
def test_parsing_adb_wifi_with_mixed_line_endings(self):
|
||||
da_adb = DumpsysADBArtifact()
|
||||
data = (
|
||||
b"ADB MANAGER STATE (dumpsys adb):\n"
|
||||
b"{\n"
|
||||
b" debugging_manager={\n"
|
||||
b" connected_to_adb=true\n"
|
||||
b" user_keys=QUJDRA== host@example\n"
|
||||
b" adb_wifi={\n"
|
||||
b" enabled=false\n"
|
||||
b" }\n"
|
||||
b" }\r\n"
|
||||
b"}\n"
|
||||
b"--------- duration\n"
|
||||
)
|
||||
|
||||
da_adb.parse(data)
|
||||
|
||||
assert len(da_adb.results) == 1
|
||||
assert da_adb.results[0]["user_keys"][0]["user"] == "host@example"
|
||||
assert da_adb.results[0]["adb_wifi"]["enabled"] == b"false"
|
||||
|
||||
|
||||
class TestDumpsysADBStateAlerts:
|
||||
def test_no_androidqf_context_preserves_existing_behavior(self):
|
||||
module = DumpsysADBState(
|
||||
|
||||
Reference in new issue
Block a user