Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Unified Diff: tests/standalone/io/process_working_directory_test.dart

Issue 15883003: Remove ProcessOptions and make the options named arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments cleanup. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/process_working_directory_test.dart
diff --git a/tests/standalone/io/process_working_directory_test.dart b/tests/standalone/io/process_working_directory_test.dart
index 9bc1d0c1471e8b3b1a2e74fa08969fac35ba456c..eb8a9b9feaf4c8a0e181727785a3dd837f46e85f 100644
--- a/tests/standalone/io/process_working_directory_test.dart
+++ b/tests/standalone/io/process_working_directory_test.dart
@@ -21,39 +21,36 @@ class ProcessWorkingDirectoryTest {
Directory directory = new Directory("").createTempSync();
Expect.isTrue(directory.existsSync());
- var options = new ProcessOptions();
- options.workingDirectory = directory.path;
- var processFuture =
- Process.start(fullTestFilePath, const ["0", "0", "99", "0"], options);
- processFuture.then((process) {
- process.exitCode.then((int exitCode) {
- Expect.equals(exitCode, 99);
- directory.deleteSync();
- });
- process.stdout.listen((_) {});
- process.stderr.listen((_) {});
- }).catchError((error) {
- directory.deleteSync();
- Expect.fail("Couldn't start process");
- });
+ Process.start(fullTestFilePath,
+ const ["0", "0", "99", "0"],
+ workingDirectory: directory.path)
+ .then((process) {
+ process.exitCode.then((int exitCode) {
+ Expect.equals(exitCode, 99);
+ directory.deleteSync();
+ });
+ process.stdout.listen((_) {});
+ process.stderr.listen((_) {});
+ }).catchError((error) {
+ directory.deleteSync();
+ Expect.fail("Couldn't start process");
+ });
}
static void testInvalidDirectory() {
Directory directory = new Directory("").createTempSync();
Expect.isTrue(directory.existsSync());
- var options = new ProcessOptions();
- options.workingDirectory = directory.path + "/subPath";
- var future = Process.start(fullTestFilePath,
- const ["0", "0", "99", "0"],
- options);
- future.then((process) {
- Expect.fail("bad process completed");
- directory.deleteSync();
- }).catchError((e) {
- Expect.isNotNull(e);
- directory.deleteSync();
- });
+ Process.start(fullTestFilePath,
+ const ["0", "0", "99", "0"],
+ workingDirectory: directory.path + "/subPath")
+ .then((process) {
+ Expect.fail("bad process completed");
+ directory.deleteSync();
+ }).catchError((e) {
+ Expect.isNotNull(e);
+ directory.deleteSync();
+ });
}
}

Powered by Google App Engine
This is Rietveld 408576698