mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 17:46:47 +01:00
Refactor: Putting test output in out/
directory.
To avoid cluttering the repo root.
This commit is contained in:
parent
0eb27e79b9
commit
be4fa2279c
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,9 +1,3 @@
|
|||||||
Generated by tests
|
|
||||||
/foobar.md
|
|
||||||
/xyz
|
|
||||||
screenshot.png
|
|
||||||
|
|
||||||
|
|
||||||
################
|
################
|
||||||
# IntelliJ #
|
# IntelliJ #
|
||||||
################
|
################
|
||||||
|
@ -76,15 +76,15 @@ public class RealDeviceTestCases {
|
|||||||
@Test
|
@Test
|
||||||
public void testPullFile() throws Exception {
|
public void testPullFile() throws Exception {
|
||||||
JadbDevice any = jadb.getAnyDevice();
|
JadbDevice any = jadb.getAnyDevice();
|
||||||
any.pull(new RemoteFile("/sdcard/README.md"), new File("foobar.md"));
|
any.pull(new RemoteFile("/sdcard/README.md"), new File("out/foobar.md"));
|
||||||
//second read on the same device
|
//second read on the same device
|
||||||
any.pull(new RemoteFile("/sdcard/README.md"), new File("foobar.md"));
|
any.pull(new RemoteFile("/sdcard/README.md"), new File("out/foobar.md"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = JadbException.class)
|
@Test(expected = JadbException.class)
|
||||||
public void testPullInvalidFile() throws Exception {
|
public void testPullInvalidFile() throws Exception {
|
||||||
JadbDevice any = jadb.getAnyDevice();
|
JadbDevice any = jadb.getAnyDevice();
|
||||||
any.pull(new RemoteFile("/file/does/not/exist"), new File("xyz"));
|
any.pull(new RemoteFile("/file/does/not/exist"), new File("out/xyz"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -99,7 +99,7 @@ public class RealDeviceTestCases {
|
|||||||
JadbDevice any = jadb.getAnyDevice();
|
JadbDevice any = jadb.getAnyDevice();
|
||||||
FileOutputStream outputStream = null;
|
FileOutputStream outputStream = null;
|
||||||
try {
|
try {
|
||||||
outputStream = new FileOutputStream(new File("screenshot.png"));
|
outputStream = new FileOutputStream(new File("out/screenshot.png"));
|
||||||
InputStream stdout = any.executeShell("screencap", "-p");
|
InputStream stdout = any.executeShell("screencap", "-p");
|
||||||
Stream.copy(stdout, outputStream);
|
Stream.copy(stdout, outputStream);
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user