| Index: packages/intl/test/data_directory.dart
|
| diff --git a/packages/intl/test/data_directory.dart b/packages/intl/test/data_directory.dart
|
| index 70aa385cfbb7c3518b1bdcba4be4dd76d3882435..72e33c68082d4d0b581b85f7485292c6dd2c79c2 100644
|
| --- a/packages/intl/test/data_directory.dart
|
| +++ b/packages/intl/test/data_directory.dart
|
| @@ -2,15 +2,13 @@
|
| // 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.
|
|
|
| -/**
|
| - * A utility function for test and tools that compensates (at least for very
|
| - * simple cases) for file-dependent programs being run from different
|
| - * directories. The important cases are
|
| - * - running in the directory that contains the test itself, i.e.
|
| - * test/ or a sub-directory.
|
| - * - running in root of this package, which is where the editor and bots will
|
| - * run things by default
|
| - */
|
| +/// A utility function for test and tools that compensates (at least for very
|
| +/// simple cases) for file-dependent programs being run from different
|
| +/// directories. The important cases are
|
| +/// - running in the directory that contains the test itself, i.e.
|
| +/// test/ or a sub-directory.
|
| +/// - running in root of this package, which is where the editor and bots will
|
| +/// run things by default
|
| library data_directory;
|
|
|
| import "dart:io";
|
| @@ -29,7 +27,12 @@ bool _isIntlRoot(String dir) {
|
| }
|
|
|
| String get intlDirectory {
|
| - var dir = path.fromUri(Platform.script);
|
| + var dir;
|
| + if (Platform.script.scheme == 'file') {
|
| + dir = path.fromUri(Platform.script);
|
| + } else {
|
| + dir = Directory.current.absolute.path;
|
| + }
|
| var root = path.rootPrefix(dir);
|
|
|
| while (dir != root) {
|
|
|