OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:io'; | 6 import 'dart:io'; |
7 | 7 |
8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
9 import 'package:scheduled_test/descriptor.dart' as d; | 9 import 'package:scheduled_test/descriptor.dart' as d; |
10 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 expect(descriptor, isDirectoryDescriptor('descriptor', [ | 432 expect(descriptor, isDirectoryDescriptor('descriptor', [ |
433 isDirectoryDescriptor('subdir', [ | 433 isDirectoryDescriptor('subdir', [ |
434 isFileDescriptor('subfile1.txt', 'subcontents1'), | 434 isFileDescriptor('subfile1.txt', 'subcontents1'), |
435 isFileDescriptor('subfile2.txt', 'subcontents2') | 435 isFileDescriptor('subfile2.txt', 'subcontents2') |
436 ]), | 436 ]), |
437 isFileDescriptor('file1.txt', 'contents1'), | 437 isFileDescriptor('file1.txt', 'contents1'), |
438 isFileDescriptor('file2.txt', 'contents2') | 438 isFileDescriptor('file2.txt', 'contents2') |
439 ])); | 439 ])); |
440 }); | 440 }); |
441 }); | 441 }); |
| 442 |
| 443 expectTestPasses("new DirectoryDescriptor().fromFilesystem ignores hidden " |
| 444 "files", () { |
| 445 scheduleSandbox(); |
| 446 |
| 447 d.dir('dir', [ |
| 448 d.dir('subdir', [ |
| 449 d.file('subfile1.txt', 'subcontents1'), |
| 450 d.file('.hidden', 'subcontents2') |
| 451 ]), |
| 452 d.file('file1.txt', 'contents1'), |
| 453 d.file('.DS_Store', 'contents2') |
| 454 ]).create(); |
| 455 |
| 456 schedule(() { |
| 457 var descriptor = new d.DirectoryDescriptor.fromFilesystem( |
| 458 "descriptor", path.join(sandbox, 'dir')); |
| 459 expect(descriptor, isDirectoryDescriptor('descriptor', [ |
| 460 isDirectoryDescriptor('subdir', [ |
| 461 isFileDescriptor('subfile1.txt', 'subcontents1') |
| 462 ]), |
| 463 isFileDescriptor('file1.txt', 'contents1') |
| 464 ])); |
| 465 }); |
| 466 }); |
442 } | 467 } |
OLD | NEW |