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

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

Issue 899243002: Make standalone tests not dependent on current working directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/io/file_invalid_arguments_test.dart
diff --git a/tests/standalone/io/file_invalid_arguments_test.dart b/tests/standalone/io/file_invalid_arguments_test.dart
index 58c6d7c423e54fa9f8a66fb082b823244cf69161..335e5748754f43d6a6b37f5286d6c942b5207a1d 100644
--- a/tests/standalone/io/file_invalid_arguments_test.dart
+++ b/tests/standalone/io/file_invalid_arguments_test.dart
@@ -99,7 +99,10 @@ void testFileSystemEntity() {
}
String getFilename(String path) {
- return new File(path).existsSync() ? path : 'runtime/$path';
+ var testPath = Platform.script.resolve('../../../$path');
+ return new File.fromUri(testPath).existsSync()
+ ? testPath.toFilePath()
+ : Platform.script.resolve('../../../runtime/$path').toFilePath();
}
main() {

Powered by Google App Engine
This is Rietveld 408576698