mirror of
https://github.com/revanced/jadb.git
synced 2024-11-19 10:39:23 +01:00
fix FakeADBServer testcases which expect certain commands...however due to previous commits these commands are now quoted
This commit is contained in:
parent
597102ab83
commit
3ace8c814d
@ -99,7 +99,7 @@ public class MockedTestCases {
|
||||
@Test
|
||||
public void testExecuteShell() throws Exception {
|
||||
server.add("serial-123");
|
||||
server.expectShell("serial-123", "ls -l").returns("total 0");
|
||||
server.expectShell("serial-123", "ls '-l'").returns("total 0");
|
||||
JadbDevice device = connection.getDevices().get(0);
|
||||
device.executeShell("ls", "-l");
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class PackageManagerTest {
|
||||
String response = "package:/system/priv-app/Contacts.apk-com.android.contacts\n" +
|
||||
"package:/system/priv-app/Teleservice.apk-com.android.phone";
|
||||
|
||||
server.expectShell(DEVICE_SERIAL, "pm list packages").returns(response);
|
||||
server.expectShell(DEVICE_SERIAL, "pm 'list' 'packages'").returns(response);
|
||||
|
||||
//Act
|
||||
List<Package> actual = new PackageManager(device).getPackages();
|
||||
@ -64,7 +64,7 @@ public class PackageManagerTest {
|
||||
"[malformed_line]\n" +
|
||||
"package:/system/priv-app/Teleservice.apk-com.android.phone";
|
||||
|
||||
server.expectShell(DEVICE_SERIAL, "pm list packages").returns(response);
|
||||
server.expectShell(DEVICE_SERIAL, "pm 'list' 'packages'").returns(response);
|
||||
|
||||
//Act
|
||||
List<Package> actual = new PackageManager(device).getPackages();
|
||||
@ -79,7 +79,7 @@ public class PackageManagerTest {
|
||||
List<Package> expected = new ArrayList<>();
|
||||
String response = "";
|
||||
|
||||
server.expectShell(DEVICE_SERIAL, "pm list packages").returns(response);
|
||||
server.expectShell(DEVICE_SERIAL, "pm 'list' 'packages'").returns(response);
|
||||
|
||||
//Act
|
||||
List<Package> actual = new PackageManager(device).getPackages();
|
||||
|
Loading…
Reference in New Issue
Block a user