Chromium Code Reviews| Index: tests/standalone/io/file_read_special_device_test.dart |
| diff --git a/tests/standalone/io/file_read_special_device_test.dart b/tests/standalone/io/file_read_special_device_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3d01a9a7db7348eebb7ae64962f8738e54fc1ae8 |
| --- /dev/null |
| +++ b/tests/standalone/io/file_read_special_device_test.dart |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +import 'dart:io'; |
| + |
| +void openAndWriteScript(String script) { |
| + var options = new Options(); |
| + 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.
|
| + script = "$dir/$script"; |
| + var executable = options.executable; |
| + var file = script; // Use script as file. |
| + Process.start("bash", ["-c", "$executable $script < $file"]).then((process) { |
| + process.exitCode |
| + .then((exitCode) { |
| + Expect.equals(0, exitCode); |
| + }); |
| + }); |
| +} |
| + |
| +void testReadStdio() { |
| + openAndWriteScript("file_read_stdio_script.dart"); |
| +} |
| + |
| +void main() { |
| + testReadStdio(); |
| +} |