-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2332 from gogolon/feature/add-adb-forward-list-to…
…-adb-wrapper Add `adb forward --list` to adb wrapper
- Loading branch information
Showing
5 changed files
with
91 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import 'package:adb/adb.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
group( | ||
'AdbForwardList', | ||
() { | ||
test('returns an empty map if adb forward --list output is empty', () { | ||
const output = ''' | ||
'''; | ||
expect(AdbForwardList.parse(output), <String, Map<int, int>>{}); | ||
}); | ||
|
||
test('parses adb forward --list output correctly', () { | ||
const output = ''' | ||
emulator-5554 tcp:60000 tcp:60001 | ||
emulator-5554 tcp:61234 tcp:61235 | ||
emulator-5556 tcp:61341 tcp:62562 | ||
'''; | ||
|
||
final result = AdbForwardList.parse(output); | ||
expect( | ||
result, | ||
{ | ||
'emulator-5554': { | ||
60000: 60001, | ||
61234: 61235, | ||
}, | ||
'emulator-5556': { | ||
61341: 62562, | ||
}, | ||
}, | ||
); | ||
}); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: location_workspace | ||
|
||
environment: | ||
sdk: '>=3.3.0-0 <4.0.0' | ||
sdk: '>=3.3.0 <4.0.0' | ||
|
||
dev_dependencies: | ||
melos: ^3.1.1 |