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

Side by Side Diff: tests/standalone/src/io/DartStdIOPipeTest.dart

Issue 10021048: Remove need to instantiate Platform and make methods static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add stable test binaries. Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | tests/standalone/src/io/DirectoryErrorTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Test a dart sub-process handling stdio with different types of 5 // Test a dart sub-process handling stdio with different types of
6 // redirection. 6 // redirection.
7 // 7 //
8 // VMOptions= 8 // VMOptions=
9 // VMOptions=--short_socket_read 9 // VMOptions=--short_socket_read
10 // VMOptions=--short_socket_write 10 // VMOptions=--short_socket_write
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 process.onError = (ProcessException error) { 73 process.onError = (ProcessException error) {
74 Expect.fail(error.toString()); 74 Expect.fail(error.toString());
75 }; 75 };
76 } 76 }
77 77
78 // This tests that the Dart standalone VM can handle piping to stdin 78 // This tests that the Dart standalone VM can handle piping to stdin
79 // and can pipe to stdout. 79 // and can pipe to stdout.
80 main() { 80 main() {
81 // Don't try to run shell scripts on Windows. 81 // Don't try to run shell scripts on Windows.
82 var os = new Platform().operatingSystem(); 82 var os = Platform.operatingSystem();
83 if (os == 'windows') return; 83 if (os == 'windows') return;
84 84
85 // Get the shell script for testing the Standalone Dart VM with 85 // Get the shell script for testing the Standalone Dart VM with
86 // piping and redirections of stdio. 86 // piping and redirections of stdio.
87 var shellScript = new File("tests/standalone/src/io/DartStdIOPipeTest.sh"); 87 var shellScript = new File("tests/standalone/src/io/DartStdIOPipeTest.sh");
88 if (!shellScript.existsSync()) { 88 if (!shellScript.existsSync()) {
89 shellScript = new File("../tests/standalone/src/io/DartStdIOPipeTest.sh"); 89 shellScript = new File("../tests/standalone/src/io/DartStdIOPipeTest.sh");
90 } 90 }
91 // Get the Dart script file which echoes stdin to stdout or stderr or both. 91 // Get the Dart script file which echoes stdin to stdout or stderr or both.
92 var scriptFile = new File("tests/standalone/src/io/ProcessStdIOScript.dart"); 92 var scriptFile = new File("tests/standalone/src/io/ProcessStdIOScript.dart");
93 if (!scriptFile.existsSync()) { 93 if (!scriptFile.existsSync()) {
94 scriptFile = new File("../tests/standalone/src/io/ProcessStdIOScript.dart"); 94 scriptFile = new File("../tests/standalone/src/io/ProcessStdIOScript.dart");
95 } 95 }
96 96
97 // Run the shell script. 97 // Run the shell script.
98 test(shellScript.name, scriptFile.name, "0"); 98 test(shellScript.name, scriptFile.name, "0");
99 test(shellScript.name, scriptFile.name, "1"); 99 test(shellScript.name, scriptFile.name, "1");
100 test(shellScript.name, scriptFile.name, "2"); 100 test(shellScript.name, scriptFile.name, "2");
101 } 101 }
OLDNEW
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | tests/standalone/src/io/DirectoryErrorTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698