| 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..3855395457a915f51e91848a763ea978e5b06188
|
| --- /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;
|
| + 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();
|
| +}
|
|
|