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

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

Issue 1991543002: Update status for (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « tests/lib/lib.status ('k') | tests/standalone/io/stdio_nonblocking_test.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) 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 import "dart:convert"; 5 import "dart:convert";
6 import "dart:io"; 6 import "dart:io";
7 7
8 import "package:path/path.dart"; 8 import "package:path/path.dart";
9 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
10 10
11 void testReadByte() { 11 void testReadByte() {
12 void test(String line, List<String> expected) { 12 void test(String line, List<String> expected) {
13 var script = Platform.script.resolve("stdin_sync_script.dart").toFilePath(); 13 var script = Platform.script.resolve("stdin_sync_script.dart").toFilePath();
14 Process.start(Platform.executable, 14 Process.start(Platform.executable,
15 ["--checked", script]..addAll( 15 [script]..addAll(
16 expected.map(JSON.encode))).then((process) { 16 expected.map(JSON.encode))).then((process) {
17 process.stdin.write(line); 17 process.stdin.write(line);
18 process.stdin.close(); 18 process.stdin.close();
19 process.stderr 19 process.stderr
20 .transform(UTF8.decoder) 20 .transform(UTF8.decoder)
21 .transform(new LineSplitter()) 21 .transform(new LineSplitter())
22 .fold(new StringBuffer(), (b, d) => b..write(d)) 22 .fold(new StringBuffer(), (b, d) => b..write(d))
23 .then((data) { 23 .then((data) {
24 if (data.toString() != '') throw "Bad output: '$data'"; 24 if (data.toString() != '') throw "Bad output: '$data'";
25 }); 25 });
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 71
72 void main() { 72 void main() {
73 testReadByte(); 73 testReadByte();
74 74
75 // testEchoMode and testLineMode is developer-interactive tests, thus not 75 // testEchoMode and testLineMode is developer-interactive tests, thus not
76 // enabled. 76 // enabled.
77 //testEchoMode(); 77 //testEchoMode();
78 //testLineMode(); 78 //testLineMode();
79 } 79 }
OLDNEW
« no previous file with comments | « tests/lib/lib.status ('k') | tests/standalone/io/stdio_nonblocking_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698