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

Side by Side Diff: tests/standalone/io/process_run_output_test.dart

Issue 16959004: Remove Encoding.BINARY (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/process_std_io_script2.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Test script for testing that output is handled correctly for 5 // Test script for testing that output is handled correctly for
6 // non-interactive processes started with Process.run. 6 // non-interactive processes started with Process.run.
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import "dart:io"; 9 import "dart:io";
10 import "process_test_util.dart"; 10 import "process_test_util.dart";
(...skipping 13 matching lines...) Expand all
24 24
25 test(scriptFile, encoding, stream) { 25 test(scriptFile, encoding, stream) {
26 var enc; 26 var enc;
27 if (encoding == 'ascii') { 27 if (encoding == 'ascii') {
28 enc = Encoding.ASCII; 28 enc = Encoding.ASCII;
29 } else if (encoding == 'latin1') { 29 } else if (encoding == 'latin1') {
30 enc = Encoding.ISO_8859_1; 30 enc = Encoding.ISO_8859_1;
31 } else if (encoding == 'utf8') { 31 } else if (encoding == 'utf8') {
32 enc = Encoding.UTF_8; 32 enc = Encoding.UTF_8;
33 } else if (encoding == 'binary') { 33 } else if (encoding == 'binary') {
34 enc = Encoding.BINARY; 34 enc = null;
35 } 35 }
36 36
37 if (stream == 'stdout') { 37 if (stream == 'stdout') {
38 Process.run(new Options().executable, 38 Process.run(new Options().executable,
39 [scriptFile, encoding, stream], 39 [scriptFile, encoding, stream],
40 stdoutEncoding: enc). then((result) { 40 stdoutEncoding: enc). then((result) {
41 Expect.equals(result.exitCode, 0); 41 Expect.equals(result.exitCode, 0);
42 Expect.equals(result.stderr, ''); 42 Expect.equals(result.stderr, '');
43 checkOutput(encoding, result.stdout); 43 checkOutput(encoding, result.stdout);
44 }); 44 });
(...skipping 17 matching lines...) Expand all
62 Expect.isTrue(scriptFile.existsSync()); 62 Expect.isTrue(scriptFile.existsSync());
63 test(scriptFile.path, 'ascii', 'stdout'); 63 test(scriptFile.path, 'ascii', 'stdout');
64 test(scriptFile.path, 'ascii', 'stderr'); 64 test(scriptFile.path, 'ascii', 'stderr');
65 test(scriptFile.path, 'latin1', 'stdout'); 65 test(scriptFile.path, 'latin1', 'stdout');
66 test(scriptFile.path, 'latin1', 'stderr'); 66 test(scriptFile.path, 'latin1', 'stderr');
67 test(scriptFile.path, 'utf8', 'stdout'); 67 test(scriptFile.path, 'utf8', 'stdout');
68 test(scriptFile.path, 'utf8', 'stderr'); 68 test(scriptFile.path, 'utf8', 'stderr');
69 test(scriptFile.path, 'binary', 'stdout'); 69 test(scriptFile.path, 'binary', 'stdout');
70 test(scriptFile.path, 'binary', 'stderr'); 70 test(scriptFile.path, 'binary', 'stderr');
71 } 71 }
OLDNEW
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/process_std_io_script2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698