Chromium Code Reviews| Index: intl/test/data_directory.dart |
| =================================================================== |
| --- intl/test/data_directory.dart (revision 19940) |
| +++ intl/test/data_directory.dart (working copy) |
| @@ -14,12 +14,18 @@ |
| String get _sep => Platform.pathSeparator; |
| get dataDirectory { |
| - var current = new Directory.current().path; |
| + var dir = new Directory.current(); |
| + var current = dir.path; |
| if (new RegExp('.*${_sep}test').hasMatch(current)) { |
| return '..${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}'; |
| } |
| if (new RegExp('.*${_sep}intl').hasMatch(current)) { |
| return 'lib${_sep}src${_sep}data${_sep}dates${_sep}'; |
| } |
| - return 'pkg${_sep}intl${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}'; |
| + if (new Directory('${dir.path}${_sep}pkg').existsSync()) { |
|
kustermann
2013/03/15 22:21:36
Use current instead of dir.path?
Ivan Posva
2013/03/15 22:25:57
Changed all instances to cwd instead.
|
| + return 'pkg${_sep}intl${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}'; |
| + } else if (new Directory('${dir.path}${_sep}..${_sep}pkg').existsSync()) { |
| + return '..${_sep}pkg${_sep}intl${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}'; |
|
kustermann
2013/03/15 22:21:36
long line
Ivan Posva
2013/03/15 22:25:57
Done.
|
| + } |
| + throw new UnsupportedError('Cannot find pkg${_sep}intl directory'); |
| } |