OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 // OtherResources=stdio_implicit_close_script.dart |
| 6 |
5 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
6 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
7 import "dart:convert"; | 9 import "dart:convert"; |
8 import "dart:io"; | 10 import "dart:io"; |
9 | 11 |
10 void test({bool closeStdout, bool closeStderr}) { | 12 void test({bool closeStdout, bool closeStderr}) { |
11 var scriptFile = "stdio_implicit_close_script.dart"; | 13 var scriptFile = "stdio_implicit_close_script.dart"; |
12 var script = Platform.script.resolve(scriptFile).toFilePath(); | 14 var script = Platform.script.resolve(scriptFile).toFilePath(); |
13 | 15 |
14 // Relying on these flags to print something specific on stdout and stderr | 16 // Relying on these flags to print something specific on stdout and stderr |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 49 } |
48 | 50 |
49 void main() { | 51 void main() { |
50 asyncStart(); | 52 asyncStart(); |
51 test(closeStdout: false, closeStderr: false); | 53 test(closeStdout: false, closeStderr: false); |
52 test(closeStdout: false, closeStderr: true); | 54 test(closeStdout: false, closeStderr: true); |
53 test(closeStdout: true, closeStderr: false); | 55 test(closeStdout: true, closeStderr: false); |
54 test(closeStdout: true, closeStderr: true); | 56 test(closeStdout: true, closeStderr: true); |
55 asyncEnd(); | 57 asyncEnd(); |
56 } | 58 } |
OLD | NEW |