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

Unified Diff: tests/standalone/src/io/ProcessRunOutputTest.dart

Issue 10252020: test rename overhaul: step 12 - standalone (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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/src/io/ProcessRunOutputTest.dart
diff --git a/tests/standalone/src/io/ProcessRunOutputTest.dart b/tests/standalone/src/io/ProcessRunOutputTest.dart
deleted file mode 100644
index 1b32f452c1dd871e3d6e8c9fe5552f129d5693bd..0000000000000000000000000000000000000000
--- a/tests/standalone/src/io/ProcessRunOutputTest.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012, 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.
-//
-// Test script for testing that output is handled correctly for
-// non-interactive processes started with Process.run.
-
-#import("dart:io");
-#source("ProcessTestUtil.dart");
-
-checkOutput(encoding, output) {
- if (encoding == 'ascii') {
- Expect.equals(output, 'abc');
- } else if (encoding == 'latin1') {
- Expect.equals(output, 'æøå');
- } else if (encoding == 'utf8') {
- Expect.listEquals(output.charCodes(), [955]);
- }
-}
-
-test(scriptFile, encoding, stream) {
- var enc;
- if (encoding == 'ascii') {
- enc = Encoding.ASCII;
- } else if (encoding == 'latin1') {
- enc = Encoding.ISO_8859_1;
- } else if (encoding == 'utf8') {
- enc = Encoding.UTF_8;
- }
-
- var options = new ProcessOptions();
- if (stream == 'stdout') {
- options.stdoutEncoding = enc;
- new Process.run(getDartFileName(), [scriptFile, encoding, stream],
- options, (exit, out, err) {
- Expect.equals(exit, 0);
- Expect.equals(err, '');
- checkOutput(encoding, out);
- });
- } else {
- options.stderrEncoding = enc;
- new Process.run(getDartFileName(), [scriptFile, encoding, stream],
- options, (exit, out, err) {
- Expect.equals(exit, 0);
- Expect.equals(out, '');
- checkOutput(encoding, err);
- });
- }
-}
-
-main() {
- var scriptFile = new File("tests/standalone/src/io/ProcessStdIOScript2.dart");
- if (!scriptFile.existsSync()) {
- scriptFile =
- new File("../tests/standalone/src/io/ProcessStdIOScript2.dart");
- }
- Expect.isTrue(scriptFile.existsSync());
- test(scriptFile.name, 'ascii', 'stdout');
- test(scriptFile.name, 'ascii', 'stderr');
- test(scriptFile.name, 'latin1', 'stdout');
- test(scriptFile.name, 'latin1', 'stderr');
- test(scriptFile.name, 'utf8', 'stdout');
- test(scriptFile.name, 'utf8', 'stderr');
-
-}
« no previous file with comments | « tests/standalone/src/io/ProcessInvalidArgumentsTest.dart ('k') | tests/standalone/src/io/ProcessSegfaultTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698