Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Unified Diff: tests/standalone/io/process_run_output_test.dart

Issue 16309014: Add support for binary stdout/stderr data when using Process.run (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed debug print Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/standalone/io/process_run_output_test.dart
diff --git a/tests/standalone/io/process_run_output_test.dart b/tests/standalone/io/process_run_output_test.dart
index 6bdbf447212e086e5426aeb14427e8ac32d9e610..2510d43bbca6176f1382eac219ce78fcb04af55f 100644
--- a/tests/standalone/io/process_run_output_test.dart
+++ b/tests/standalone/io/process_run_output_test.dart
@@ -16,6 +16,9 @@ checkOutput(encoding, output) {
Expect.equals(output, 'æøå');
} else if (encoding == 'utf8') {
Expect.listEquals(output.codeUnits, [955]);
+ } else if (encoding == 'binary') {
+ print(output);
+ Expect.listEquals(output, [0, 1, 2]);
}
}
@@ -27,6 +30,8 @@ test(scriptFile, encoding, stream) {
enc = Encoding.ISO_8859_1;
} else if (encoding == 'utf8') {
enc = Encoding.UTF_8;
+ } else if (encoding == 'binary') {
+ enc = Encoding.BINARY;
}
if (stream == 'stdout') {
@@ -61,5 +66,6 @@ main() {
test(scriptFile.path, 'latin1', 'stderr');
test(scriptFile.path, 'utf8', 'stdout');
test(scriptFile.path, 'utf8', 'stderr');
-
+ test(scriptFile.path, 'binary', 'stdout');
+ test(scriptFile.path, 'binary', 'stderr');
}

Powered by Google App Engine
This is Rietveld 408576698