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

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

Issue 23528006: Use correct output encoding in Process.runSync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/process_run_test.dart
diff --git a/tests/standalone/io/process_run_test.dart b/tests/standalone/io/process_run_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2e07d0d5266793cf2f6956ca3ecf37c0afd02aa8
--- /dev/null
+++ b/tests/standalone/io/process_run_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2013, 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:io';
+
+import "package:expect/expect.dart";
+
+import "process_test_util.dart";
+
+
+void testProcessRunBinaryOutput() {
+ var result = Process.runSync(getProcessTestFileName(),
+ const ["0", "0", "0", "0"],
+ stdoutEncoding: null);
+ Expect.isTrue(result.stdout is List<int>);
+ Expect.isTrue(result.stderr is String);
+
+ result = Process.runSync(getProcessTestFileName(),
+ const ["0", "0", "0", "0"],
+ stderrEncoding: null);
+ Expect.isTrue(result.stdout is String);
+ Expect.isTrue(result.stderr is List<int>);
+
+ result = Process.runSync(getProcessTestFileName(),
+ const ["0", "0", "0", "0"],
+ stdoutEncoding: null,
+ stderrEncoding: null);
+ Expect.isTrue(result.stdout is List<int>);
+ Expect.isTrue(result.stderr is List<int>);
+}
+
+
+void main() {
+ testProcessRunBinaryOutput();
+}
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698