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

Side by Side Diff: tests/standalone/io/regress_7679_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 main() { 8 main() {
9 Directory temp = new Directory('').createTempSync(); 9 Directory temp = new Directory('').createTempSync();
10 File script = new File('${temp.path}/script.dart'); 10 File script = new File('${temp.path}/script.dart');
(...skipping 16 matching lines...) Expand all
27 d = new Directory('b/c/d'); 27 d = new Directory('b/c/d');
28 d.create(recursive: true).then((_) { 28 d.create(recursive: true).then((_) {
29 d.exists().then((result) { 29 d.exists().then((result) {
30 Expect.isTrue(result); 30 Expect.isTrue(result);
31 }); 31 });
32 }); 32 });
33 }); 33 });
34 }); 34 });
35 } 35 }
36 """); 36 """);
37 ProcessOptions options = new ProcessOptions();
38 options.workingDirectory = temp.path;
39 String executable = new File(new Options().executable).fullPathSync(); 37 String executable = new File(new Options().executable).fullPathSync();
40 Process.run(executable, ['script.dart'], options).then((result) { 38 Process.run(executable, ['script.dart'], workingDirectory: temp.path)
41 temp.deleteSync(recursive: true); 39 .then((result) {
42 Expect.equals(0, result.exitCode); 40 temp.deleteSync(recursive: true);
43 }); 41 Expect.equals(0, result.exitCode);
42 });
44 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698