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

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

Issue 1158743003: Fix test 'platform_executable_test' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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 // Process test program to test process communication. 5 // Process test program to test process communication.
6 6
7 library PlatformExecutableTest; 7 library PlatformExecutableTest;
8 8
9 import "dart:io"; 9 import "dart:io";
10 10
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 void testDartExecShouldNotBeInCurrentDir() { 41 void testDartExecShouldNotBeInCurrentDir() {
42 var type = FileSystemEntity.typeSync(platformExeName); 42 var type = FileSystemEntity.typeSync(platformExeName);
43 expectEquals(FileSystemEntityType.NOT_FOUND, type); 43 expectEquals(FileSystemEntityType.NOT_FOUND, type);
44 } 44 }
45 45
46 void testShouldFailOutsidePath() { 46 void testShouldFailOutsidePath() {
47 var threw = false; 47 var threw = false;
48 try { 48 try {
49 Process.runSync(platformExeName, [platformExeName], 49 Process.runSync(platformExeName, ['--version'],
50 includeParentEnvironment: false, environment: {_SCRIPT_KEY: 'yes'}); 50 includeParentEnvironment: false,
51 environment: {_SCRIPT_KEY: 'yes', 'PATH': ''});
51 } catch (_) { 52 } catch (_) {
52 threw = true; 53 threw = true;
53 } 54 }
54 55
55 if (!threw) { 56 if (!threw) {
56 throw 'Expected running the dart executable – "$platformExeName" without' 57 throw 'Expected running the dart executable – "$platformExeName" without'
57 ' the parent environment or path to fail.'; 58 ' the parent environment or path to fail.';
58 } 59 }
59 } 60 }
60 61
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 144
144 testDartExecShouldNotBeInCurrentDir(); 145 testDartExecShouldNotBeInCurrentDir();
145 testShouldSucceedWithSourcePlatformExecutable(); /// 00: ok 146 testShouldSucceedWithSourcePlatformExecutable(); /// 00: ok
146 withTempDir(testExeSymLinked); /// 01: ok 147 withTempDir(testExeSymLinked); /// 01: ok
147 withTempDir(testExeDirSymLinked); /// 02: ok 148 withTempDir(testExeDirSymLinked); /// 02: ok
148 testPathToSDKDir(); /// 03: ok 149 testPathToSDKDir(); /// 03: ok
149 withTempDir(testPathPointsToSymLinkedSDKPath); /// 04: ok 150 withTempDir(testPathPointsToSymLinkedSDKPath); /// 04: ok
150 withTempDir(testPathToDirWithExeSymLinked); /// 05: ok 151 withTempDir(testPathToDirWithExeSymLinked); /// 05: ok
151 testShouldFailOutsidePath(); /// 06: ok 152 testShouldFailOutsidePath(); /// 06: ok
152 } 153 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698