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

Unified Diff: tests/standalone/io/stdin_sync_test.dart

Issue 102953008: Add getter for lineMode and echoMode for Stdin. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/stdio.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/stdin_sync_test.dart
diff --git a/tests/standalone/io/stdin_sync_test.dart b/tests/standalone/io/stdin_sync_test.dart
index 63e4f1dde1c8410b249e6505be0d937b7fad7f59..03e794cdd2501e2d9d6ecd9e7539b951106d8dd6 100644
--- a/tests/standalone/io/stdin_sync_test.dart
+++ b/tests/standalone/io/stdin_sync_test.dart
@@ -6,6 +6,7 @@ import "dart:convert";
import "dart:io";
import "package:path/path.dart";
+import "package:expect/expect.dart";
void testReadByte() {
void test(String line, List<String> expected) {
@@ -44,7 +45,10 @@ void testReadByte() {
}
void testEchoMode() {
+ stdin.echoMode = true;
+ Expect.isTrue(stdin.echoMode);
stdin.echoMode = false;
+ Expect.isFalse(stdin.echoMode);
var line;
while ((line = stdin.readLineSync()) != null) {
print("You typed: $line");
@@ -52,7 +56,10 @@ void testEchoMode() {
}
void testLineMode() {
+ stdin.lineMode = true;
+ Expect.isTrue(stdin.lineMode);
stdin.lineMode = false;
+ Expect.isFalse(stdin.lineMode);
var char;
while ((char = stdin.readByteSync()) != -1) {
print("You typed: $char");
« no previous file with comments | « sdk/lib/io/stdio.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698