| Index: tests/standalone/io/regress_8828_test.dart
|
| diff --git a/tests/standalone/io/regress_8828_test.dart b/tests/standalone/io/regress_8828_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..be134acb64af4fe2e4ff0e81d9d9d54bb21230b7
|
| --- /dev/null
|
| +++ b/tests/standalone/io/regress_8828_test.dart
|
| @@ -0,0 +1,37 @@
|
| +// 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.
|
| +
|
| +// VMOptions=
|
| +// VMOptions=--short_socket_read
|
| +// VMOptions=--short_socket_write
|
| +// VMOptions=--short_socket_read --short_socket_write
|
| +
|
| +import 'dart:io';
|
| +
|
| +void main() {
|
| + HttpServer.bind().then((server) {
|
| + server.listen((request) {
|
| + request.response
|
| + ..addString("first line\n")
|
| + ..addString("")
|
| + ..addString("second line\n")
|
| + ..close();
|
| + });
|
| +
|
| + HttpClient client = new HttpClient();
|
| + client.get("127.0.0.1", server.port, "/")
|
| + .then((HttpClientRequest request) {
|
| + return request.close();
|
| + })
|
| + .then((HttpClientResponse response) {
|
| + List<int> body = new List();
|
| + response.listen(body.addAll,
|
| + onDone: () {
|
| + Expect.equals("first line\nsecond line\n",
|
| + new String.fromCharCodes(body));
|
| + server.close();
|
| + });
|
| + });
|
| + });
|
| +}
|
|
|