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

Unified Diff: sdk/lib/_internal/pub/test/io_test.dart

Issue 215503004: Pub's listDir shouldn't fail when called within hidden directories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/io_test.dart
diff --git a/sdk/lib/_internal/pub/test/io_test.dart b/sdk/lib/_internal/pub/test/io_test.dart
index a3d7b0e8920522cc51c11f5501f09f6c219adde9..cc5d2c4d6124e3e38e1e6be34f34b99c96df9b32 100644
--- a/sdk/lib/_internal/pub/test/io_test.dart
+++ b/sdk/lib/_internal/pub/test/io_test.dart
@@ -50,6 +50,22 @@ main() {
]));
}), completes);
});
+
+ test("doesn't ignore hidden files above the directory being listed", () {
+ expect(withTempDir((temp) {
+ var dir = path.join(temp, '.foo', 'bar');
+ ensureDir(dir);
+ writeTextFile(path.join(dir, 'file1.txt'), '');
+ writeTextFile(path.join(dir, 'file2.txt'), '');
+ writeTextFile(path.join(dir, 'file3.txt'), '');
+
+ expect(listDir(dir, recursive: true), unorderedEquals([
+ path.join(dir, 'file1.txt'),
+ path.join(dir, 'file2.txt'),
+ path.join(dir, 'file3.txt')
+ ]));
+ }), completes);
+ });
});
group('canonicalize', () {
« sdk/lib/_internal/pub/lib/src/io.dart ('K') | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698