| 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; | 5 library io_test; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:pathos/path.dart' as path; | 9 import 'package:pathos/path.dart' as path; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 }); | 64 }); |
| 65 | 65 |
| 66 test('includes hidden files when told to', () { | 66 test('includes hidden files when told to', () { |
| 67 expect(withTempDir((temp) { | 67 expect(withTempDir((temp) { |
| 68 writeTextFile(path.join(temp, 'file1.txt'), ''); | 68 writeTextFile(path.join(temp, 'file1.txt'), ''); |
| 69 writeTextFile(path.join(temp, 'file2.txt'), ''); | 69 writeTextFile(path.join(temp, 'file2.txt'), ''); |
| 70 writeTextFile(path.join(temp, '.file3.txt'), ''); | 70 writeTextFile(path.join(temp, '.file3.txt'), ''); |
| 71 createDir(path.join(temp, '.subdir')); | 71 createDir(path.join(temp, '.subdir')); |
| 72 writeTextFile(path.join(temp, '.subdir', 'file3.txt'), ''); | 72 writeTextFile(path.join(temp, '.subdir', 'file3.txt'), ''); |
| 73 | 73 |
| 74 expect(listDir(temp, recursive: true, includeHiddenFiles: true), | 74 expect(listDir(temp, recursive: true, includeHidden: true), |
| 75 unorderedEquals([ | 75 unorderedEquals([ |
| 76 path.join(temp, 'file1.txt'), | 76 path.join(temp, 'file1.txt'), |
| 77 path.join(temp, 'file2.txt'), | 77 path.join(temp, 'file2.txt'), |
| 78 path.join(temp, '.file3.txt'), | 78 path.join(temp, '.file3.txt'), |
| 79 path.join(temp, '.subdir'), | 79 path.join(temp, '.subdir'), |
| 80 path.join(temp, '.subdir', 'file3.txt') | 80 path.join(temp, '.subdir', 'file3.txt') |
| 81 ])); | 81 ])); |
| 82 }), completes); | 82 }), completes); |
| 83 }); | 83 }); |
| 84 | 84 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 var symlink2Path = path.join(temp, "link2.txt"); | 271 var symlink2Path = path.join(temp, "link2.txt"); |
| 272 writeTextFile(targetPath, "contents"); | 272 writeTextFile(targetPath, "contents"); |
| 273 createSymlink(targetPath, symlink1Path); | 273 createSymlink(targetPath, symlink1Path); |
| 274 createSymlink(symlink1Path, symlink2Path); | 274 createSymlink(symlink1Path, symlink2Path); |
| 275 expect(predicate(symlink2Path), equals(forMultiLevelFileSymlink)); | 275 expect(predicate(symlink2Path), equals(forMultiLevelFileSymlink)); |
| 276 }), completes); | 276 }), completes); |
| 277 }); | 277 }); |
| 278 } | 278 } |
| 279 }); | 279 }); |
| 280 } | 280 } |
| OLD | NEW |