| OLD | NEW |
| 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 Loading... |
| 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 String executable = new File(new Options().executable).fullPathSync(); | 37 String executable = new File(Platform.executable).fullPathSync(); |
| 38 Process.run(executable, ['script.dart'], workingDirectory: temp.path) | 38 Process.run(executable, ['script.dart'], workingDirectory: temp.path) |
| 39 .then((result) { | 39 .then((result) { |
| 40 temp.deleteSync(recursive: true); | 40 temp.deleteSync(recursive: true); |
| 41 Expect.equals(0, result.exitCode); | 41 Expect.equals(0, result.exitCode); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| OLD | NEW |