| Index: tests/standalone/io/stdin_sync_script.dart
|
| diff --git a/tests/standalone/io/stdin_sync_script.dart b/tests/standalone/io/stdin_sync_script.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..acd35d221356afb5b7de5513db984f2d7ea824be
|
| --- /dev/null
|
| +++ b/tests/standalone/io/stdin_sync_script.dart
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +import "dart:io";
|
| +
|
| +void main() {
|
| + int i = 0;
|
| + String line;
|
| + while ((line = stdin.readLineSync()) != null) {
|
| + switch (i) {
|
| + case 0:
|
| + if (line != 'hej\x01\x00') throw "bad line at $i";
|
| + break;
|
| +
|
| + case 1:
|
| + if (line != '') throw "bad line at $i";
|
| + break;
|
| +
|
| + case 2:
|
| + if (line != '4') throw "bad line at $i";
|
| + break;
|
| + }
|
| + i++;
|
| + }
|
| + if (i != 3 ) throw "expect 3 lines";
|
| + print('true');
|
| +}
|
|
|