OLD | NEW |
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 library io_test; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 import 'dart:io'; | 6 import 'dart:io'; |
9 | 7 |
10 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
11 import 'package:pub/src/io.dart'; | 9 import 'package:pub/src/io.dart'; |
12 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
13 | 11 |
14 main() { | 12 main() { |
15 group('listDir', () { | 13 group('listDir', () { |
16 test('ignores hidden files by default', () { | 14 test('ignores hidden files by default', () { |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 expect(predicate(symlink2Path), equals(forMultiLevelFileSymlink)); | 350 expect(predicate(symlink2Path), equals(forMultiLevelFileSymlink)); |
353 }), completes); | 351 }), completes); |
354 }); | 352 }); |
355 } | 353 } |
356 }); | 354 }); |
357 } | 355 } |
358 | 356 |
359 /// Like [withTempDir], but canonicalizes the path before passing it to [fn]. | 357 /// Like [withTempDir], but canonicalizes the path before passing it to [fn]. |
360 Future withCanonicalTempDir(Future fn(String path)) => | 358 Future withCanonicalTempDir(Future fn(String path)) => |
361 withTempDir((temp) => fn(canonicalize(temp))); | 359 withTempDir((temp) => fn(canonicalize(temp))); |
OLD | NEW |