Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Print superclass rather than subclass logs. #2

Merged
merged 1 commit into from
Jun 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.0
## 1.0.0-rc.2

* Initial version.
* Subclassed `TestProcess`es now emit log output based on the superclass's
standard IO streams rather than the subclass's. This matches the documented
behavior.

## 1.0.0-rc.1

* Initial release candidate.
7 changes: 5 additions & 2 deletions lib/test_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,15 @@ class TestProcess {

// Listen eagerly so that the lines are interleaved properly between the two
// streams.
stdoutStream().listen((line) {
//
// Call [split] explicitly because we don't want to log overridden
// [stdoutStream] or [stderrStream] output.
_stdoutSplitter.split().listen((line) {
if (forwardStdio) print(line);
_log.add(" $line");
});

stderrStream().listen((line) {
_stderrSplitter.split().listen((line) {
if (forwardStdio) print(line);
_log.add("[e] $line");
});
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: test_process
version: 1.0.0-rc.1
version: 1.0.0-rc.2
description: A library for testing subprocesses.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/test_process
Expand Down