Print superclass rather than subclass logs. (dart-lang/test_process#2)
diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 5b26ad3..96edea9 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md
@@ -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.
diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index b4f01c3..1ad3279 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart
@@ -122,12 +122,15 @@ // 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"); });
diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 48f5b84..9e402d9 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml
@@ -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