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

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

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Dart_GetType Created 7 years, 5 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
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 21 matching lines...) Expand all
32 32
33 33
34 void test(String shellScript, String dartScript, String type, bool devNull) { 34 void test(String shellScript, String dartScript, String type, bool devNull) {
35 Directory dir = new Directory("").createTempSync(); 35 Directory dir = new Directory("").createTempSync();
36 36
37 // The shell script will run the dart executable passed with a 37 // The shell script will run the dart executable passed with a
38 // number of different redirections of stdio. 38 // number of different redirections of stdio.
39 String pipeOutFile = "${dir.path}/pipe"; 39 String pipeOutFile = "${dir.path}/pipe";
40 if (devNull) pipeOutFile = "/dev/null"; 40 if (devNull) pipeOutFile = "/dev/null";
41 String redirectOutFile = "${dir.path}/redirect"; 41 String redirectOutFile = "${dir.path}/redirect";
42 String executable = new Options().executable; 42 String executable = Platform.executable;
43 List args = 43 List args =
44 [executable, 44 [executable,
45 dartScript, 45 dartScript,
46 type, 46 type,
47 pipeOutFile, 47 pipeOutFile,
48 redirectOutFile, 48 redirectOutFile,
49 devNull ? "terminal" : "file"]; 49 devNull ? "terminal" : "file"];
50 var future = Process.start(shellScript, args); 50 var future = Process.start(shellScript, args);
51 future.then((process) { 51 future.then((process) {
52 process.exitCode.then((exitCode) { 52 process.exitCode.then((exitCode) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 // Run the shell script. 120 // Run the shell script.
121 test(shellScript.path, scriptFile.path, "0", false); 121 test(shellScript.path, scriptFile.path, "0", false);
122 test(shellScript.path, scriptFile.path, "0", true); 122 test(shellScript.path, scriptFile.path, "0", true);
123 test(shellScript.path, scriptFile.path, "1", false); 123 test(shellScript.path, scriptFile.path, "1", false);
124 test(shellScript.path, scriptFile.path, "1", true); 124 test(shellScript.path, scriptFile.path, "1", true);
125 test(shellScript.path, scriptFile.path, "2", false); 125 test(shellScript.path, scriptFile.path, "2", false);
126 test(shellScript.path, scriptFile.path, "2", true); 126 test(shellScript.path, scriptFile.path, "2", true);
127 } 127 }
OLDNEW
« no previous file with comments | « tests/standalone/http_launch_test.dart ('k') | tests/standalone/io/file_read_special_device_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698