refactor(android): move PrepareDevice doc onto it; extract tested wakeCommands

The PrepareDevice doc block was stranded above adbArgs, leaving the exported function undocumented under godoc. Move it back and split the wake/keyguard tuples into wakeCommands so they have a unit test.
This commit is contained in:
pj committed 2026-06-11 09:27:35 +05:30
1 parent 600fb71c5b
commit d3182239dc
2 files changed
+26 -14

No files matched your search

+11
View File
@@ -7,6 +7,17 @@ import (
"testing"
)
func TestWakeCommands(t *testing.T) {
want := [][]string{
{"svc", "power", "stayon", "true"},
{"input", "keyevent", "KEYCODE_WAKEUP"},
{"wm", "dismiss-keyguard"},
}
if got := wakeCommands(); !reflect.DeepEqual(got, want) {
t.Errorf("wakeCommands() = %v, want %v", got, want)
}
}
func TestParseAdbDevices_OnlineOnly(t *testing.T) {
output := `List of devices attached
emulator-5554 device