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

Side by Side Diff: pkg/intl/test/data_directory.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « pkg/intl/test/bidi_utils_test.dart ('k') | pkg/intl/test/date_time_format_file_test_stub.dart » ('j') | 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 /** 5 /**
6 * A utility function for test and tools that compensates (at least for very 6 * A utility function for test and tools that compensates (at least for very
7 * simple cases) for file-dependent programs being run from different 7 * simple cases) for file-dependent programs being run from different
8 * directories. 8 * directories.
9 */ 9 */
10 library data_directory; 10 library data_directory;
11 11
12 import 'dart:io'; 12 import 'dart:io';
13 13
14 String get _sep => Platform.pathSeparator; 14 String get _sep => Platform.pathSeparator;
15 15
16 get dataDirectory { 16 get dataDirectory {
17 var current = new Directory.current().path; 17 var current = new Directory.current().path;
18 if (new RegExp('.*${_sep}test').hasMatch(current)) { 18 if (new RegExp('.*${_sep}test').hasMatch(current)) {
19 return '..${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}'; 19 return '..${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}';
20 } 20 }
21 if (new RegExp('.*${_sep}intl').hasMatch(current)) { 21 if (new RegExp('.*${_sep}intl').hasMatch(current)) {
22 return 'lib${_sep}src${_sep}data${_sep}dates${_sep}'; 22 return 'lib${_sep}src${_sep}data${_sep}dates${_sep}';
23 } 23 }
24 return 'pkg${_sep}intl${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}'; 24 return 'pkg${_sep}intl${_sep}lib${_sep}src${_sep}data${_sep}dates${_sep}';
25 } 25 }
OLDNEW
« no previous file with comments | « pkg/intl/test/bidi_utils_test.dart ('k') | pkg/intl/test/date_time_format_file_test_stub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698