Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 import 'dart:io'; | |
| 6 | |
| 7 void openAndWriteScript(String script) { | |
| 8 var options = new Options(); | |
| 9 var dir = new Path(options.script).directoryPath.toString(); | |
|
Mads Ager (google)
2013/04/02 10:20:20
You don't need the toString here since you are usi
Anders Johnsen
2013/04/02 10:39:02
Done.
| |
| 10 script = "$dir/$script"; | |
| 11 var executable = options.executable; | |
| 12 var file = script; // Use script as file. | |
| 13 Process.start("bash", ["-c", "$executable $script < $file"]).then((process) { | |
| 14 process.exitCode | |
| 15 .then((exitCode) { | |
| 16 Expect.equals(0, exitCode); | |
| 17 }); | |
| 18 }); | |
| 19 } | |
| 20 | |
| 21 void testReadStdio() { | |
| 22 openAndWriteScript("file_read_stdio_script.dart"); | |
| 23 } | |
| 24 | |
| 25 void main() { | |
| 26 testReadStdio(); | |
| 27 } | |
| OLD | NEW |