Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: tests/standalone/io/stdio_implicit_close_test.dart

Issue 2763823002: Move spaces from before comments to within comments (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 5 // OtherResources=stdio_implicit_close_script.dart
6 6
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import "dart:convert"; 9 import "dart:convert";
10 import "dart:io"; 10 import "dart:io";
11 11
12 void test({bool closeStdout, bool closeStderr}) { 12 void test({bool closeStdout, bool closeStderr}) {
13 var scriptFile = "stdio_implicit_close_script.dart"; 13 var scriptFile = "stdio_implicit_close_script.dart";
14 var script = Platform.script.resolve(scriptFile).toFilePath(); 14 var script = Platform.script.resolve(scriptFile).toFilePath();
15 15
16 // 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
17 // is brittle, but otherwise we would need to add our own flag. 17 // is brittle, but otherwise we would need to add our own flag.
18 var arguments = [ 18 var arguments = [
19 "--print-metrics", // Prints on stderr. 19 "--print-metrics", // Prints on stderr.
20 "--timing", // Prints on stdout. 20 "--timing", // Prints on stdout.
21 script, 21 script,
22 ]; 22 ];
23 if (closeStdout) arguments.add("stdout"); 23 if (closeStdout) arguments.add("stdout");
24 if (closeStderr) arguments.add("stderr"); 24 if (closeStderr) arguments.add("stderr");
25 25
26 asyncStart(); 26 asyncStart();
27 Process.run(Platform.executable, 27 Process.run(Platform.executable,
28 arguments, 28 arguments,
29 stdoutEncoding: ASCII, 29 stdoutEncoding: ASCII,
30 stderrEncoding: ASCII).then((result) { 30 stderrEncoding: ASCII).then((result) {
(...skipping 18 matching lines...) Expand all
49 } 49 }
50 50
51 void main() { 51 void main() {
52 asyncStart(); 52 asyncStart();
53 test(closeStdout: false, closeStderr: false); 53 test(closeStdout: false, closeStderr: false);
54 test(closeStdout: false, closeStderr: true); 54 test(closeStdout: false, closeStderr: true);
55 test(closeStdout: true, closeStderr: false); 55 test(closeStdout: true, closeStderr: false);
56 test(closeStdout: true, closeStderr: true); 56 test(closeStdout: true, closeStderr: true);
57 asyncEnd(); 57 asyncEnd();
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698