mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 15:11:35 +00:00
af4330d382
This reverts commit e35120cfd1
.
Reason for revert: This CL caused some breakages in the bot.
Original change's description:
> [tests] rewrite and format several tests on http
>
> Resolve comments in previous cls.
> https://dart-review.googlesource.com/c/sdk/+/140564
> https://dart-review.googlesource.com/c/sdk/+/136322
> https://dart-review.googlesource.com/c/sdk/+/138860
>
> Change-Id: I9549019fe871f35187af5ff75df320748792498b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141845
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Jonas Termansen <sortie@google.com>
TBR=sortie@google.com,rmacnak@google.com,zichangguo@google.com
Change-Id: I1ae183dcc4b202b7b1e21d30a1407f9b038791ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144306
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
25 lines
850 B
Dart
25 lines
850 B
Dart
// Copyright (c) 2020, 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:convert';
|
|
import 'dart:io' as io;
|
|
|
|
void main(List<String> args) async {
|
|
if (args.length != 0) {
|
|
for (int i = 0; i < 100000; i++) {
|
|
print('line $i');
|
|
}
|
|
print('done');
|
|
return;
|
|
} else {
|
|
// Create child process and keeps writing into stdout.
|
|
final p = await io.Process.start(
|
|
io.Platform.executable, [io.Platform.script.toFilePath(), 'child']);
|
|
p.stdout.transform(utf8.decoder).listen((x) => print('stdout: $x'));
|
|
p.stderr.transform(utf8.decoder).listen((x) => print('stderr: $x'));
|
|
final exitCode = await p.exitCode;
|
|
print('process exited with ${exitCode}');
|
|
}
|
|
}
|