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

Unified Diff: tests/standalone/src/io/ProcessWorkingDirectoryTest.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
« no previous file with comments | « tests/standalone/src/io/ProcessTestUtil.dart ('k') | tests/standalone/src/io/ReadIntoConstListTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/ProcessWorkingDirectoryTest.dart
diff --git a/tests/standalone/src/io/ProcessWorkingDirectoryTest.dart b/tests/standalone/src/io/ProcessWorkingDirectoryTest.dart
deleted file mode 100644
index 0c4602d37ae92ffdeec4ff7d2bbc2488d1f3dac5..0000000000000000000000000000000000000000
--- a/tests/standalone/src/io/ProcessWorkingDirectoryTest.dart
+++ /dev/null
@@ -1,71 +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.
-//
-// Process working directory test.
-
-#library("ProcessWorkingDirectoryTest");
-#import("dart:io");
-#source("ProcessTestUtil.dart");
-
-class ProcessWorkingDirectoryTest {
- static String get fullTestFilePath() {
- // Extract full path, since we run processes from another directory.
- File path = new File(getProcessTestFileName());
- Expect.isTrue(path.existsSync());
- return path.fullPathSync();
- }
-
- static void testValidDirectory() {
- Directory directory = new Directory("");
- directory.createTempSync();
- Expect.isTrue(directory.existsSync());
-
- var options = new ProcessOptions();
- options.workingDirectory = directory.path;
- Process process = new Process.start(fullTestFilePath,
- const ["0", "0", "99", "0"],
- options);
-
- process.onExit = (int exitCode) {
- Expect.equals(exitCode, 99);
- process.close();
- directory.deleteSync();
- };
-
- process.onError = (error) {
- Expect.fail("error running process $error");
- directory.deleteSync();
- };
- }
-
- static void testInvalidDirectory() {
- Directory directory = new Directory("");
- directory.createTempSync();
- Expect.isTrue(directory.existsSync());
-
- var options = new ProcessOptions();
- options.workingDirectory = directory.path + "/subPath";
- Process process = new Process.start(fullTestFilePath,
- const ["0", "0", "99", "0"],
- options);
-
- process.onExit = (int exitCode) {
- Expect.fail("bad process completed");
- process.close();
- directory.deleteSync();
- };
-
- process.onError = (error) {
- Expect.isNotNull(error);
- directory.deleteSync();
- };
- }
-}
-
-
-
-main() {
- ProcessWorkingDirectoryTest.testValidDirectory();
- ProcessWorkingDirectoryTest.testInvalidDirectory();
-}
« no previous file with comments | « tests/standalone/src/io/ProcessTestUtil.dart ('k') | tests/standalone/src/io/ReadIntoConstListTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698