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

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

Issue 599303002: Don't use .gitignore when determining what to build/serve/run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use .gitignore in dartdoc validator. Created 6 years, 3 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/package_list_files_test.dart
diff --git a/sdk/lib/_internal/pub/test/package_list_files_test.dart b/sdk/lib/_internal/pub/test/package_list_files_test.dart
index 9b5a06c315dd7a990322d2a3ce2723232ae041ed..56d8fb85e6b7f0d1a65d4af93c7621f403bb51e1 100644
--- a/sdk/lib/_internal/pub/test/package_list_files_test.dart
+++ b/sdk/lib/_internal/pub/test/package_list_files_test.dart
@@ -13,8 +13,8 @@ import '../lib/src/system_cache.dart';
import 'descriptor.dart' as d;
import 'test_pub.dart';
-var root;
-var entrypoint;
+String root;
+Entrypoint entrypoint;
main() {
initConfig();
@@ -78,7 +78,7 @@ main() {
});
});
- integration("ignores files that are gitignored", () {
+ integration("ignores files that are gitignored if desired", () {
d.dir(appPath, [
d.file('.gitignore', '*.txt'),
d.file('file1.txt', 'contents'),
@@ -90,13 +90,23 @@ main() {
]).create();
schedule(() {
- expect(entrypoint.root.listFiles(), unorderedEquals([
+ expect(entrypoint.root.listFiles(useGitIgnore: true), unorderedEquals([
path.join(root, 'pubspec.yaml'),
path.join(root, '.gitignore'),
path.join(root, 'file2.text'),
path.join(root, 'subdir', 'subfile2.text')
]));
});
+
+ schedule(() {
+ expect(entrypoint.root.listFiles(), unorderedEquals([
+ path.join(root, 'pubspec.yaml'),
+ path.join(root, 'file1.txt'),
+ path.join(root, 'file2.text'),
+ path.join(root, 'subdir', 'subfile1.txt'),
+ path.join(root, 'subdir', 'subfile2.text')
+ ]));
+ });
});
commonTests();

Powered by Google App Engine
This is Rietveld 408576698