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

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

Issue 1156313004: Clean up process spawning. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/bin/process_macos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/platform_executable_test.dart
diff --git a/tests/standalone/io/platform_executable_test.dart b/tests/standalone/io/platform_executable_test.dart
index 1b6bce377de320ef95678ddda08efb6fb043792d..2b8af08a478326972639b71c9bcd886716f3c626 100644
--- a/tests/standalone/io/platform_executable_test.dart
+++ b/tests/standalone/io/platform_executable_test.dart
@@ -43,20 +43,10 @@ void testDartExecShouldNotBeInCurrentDir() {
expectEquals(FileSystemEntityType.NOT_FOUND, type);
}
-void testShouldFailOutsidePath() {
- var threw = false;
- try {
- Process.runSync(platformExeName, ['--version'],
- includeParentEnvironment: false,
- environment: {_SCRIPT_KEY: 'yes', 'PATH': ''});
- } catch (_) {
- threw = true;
- }
-
- if (!threw) {
- throw 'Expected running the dart executable – "$platformExeName" without'
- ' the parent environment or path to fail.';
- }
+void testShouldSucceedWithEmptyPathEnvironment() {
+ Process.runSync(platformExeName, ['--version'],
+ includeParentEnvironment: false,
+ environment: {_SCRIPT_KEY: 'yes', 'PATH': ''});
}
void testShouldSucceedWithSourcePlatformExecutable() {
@@ -149,5 +139,5 @@ void main() {
testPathToSDKDir(); /// 03: ok
withTempDir(testPathPointsToSymLinkedSDKPath); /// 04: ok
withTempDir(testPathToDirWithExeSymLinked); /// 05: ok
- testShouldFailOutsidePath(); /// 06: ok
kevmoo 2015/06/10 10:06:42 This test existed for a very explicit reason: make
+ testShouldSucceedWithEmptyPathEnvironment(); /// 06: ok
}
« no previous file with comments | « runtime/bin/process_macos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698