Skip to content

Commit

Permalink
[vm/test] Fix process_stderr_test.
Browse files Browse the repository at this point in the history
Make sure we compare what we read from stderr against what we sent to stdin.

Change-Id: If01aef803511f862eb3bb404af512067c04a5dc7
Reviewed-on: https://dart-review.googlesource.com/76743
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
  • Loading branch information
aam authored and commit-bot@chromium.org committed Sep 26, 2018
1 parent 0f59689 commit 9cc251c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/standalone_2/io/process_stderr_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ void test(Future<Process> future, int expectedExitCode) {

void readData(List<int> data) {
buffer.addAll(data);
for (int i = received; i < min(data.length, buffer.length) - 1; i++) {
Expect.equals(data[i], buffer[i]);
for (int i = received;
i < min(input_data.length, buffer.length) - 1;
i++) {
Expect.equals(input_data[i], buffer[i]);
}
received = buffer.length;
if (received >= input_dataSize) {
Expand Down

0 comments on commit 9cc251c

Please sign in to comment.