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

Unified Diff: pkg/analyzer/test/source/path_filter_test.dart

Issue 1276973002: More fixes for the Windows bot (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/source/path_filter_test.dart
diff --git a/pkg/analyzer/test/source/path_filter_test.dart b/pkg/analyzer/test/source/path_filter_test.dart
index 15a30e7bd1504af7c31b71829065cd34b5166258..a7e58fb69d5911b94dd40c0f04c06b58d0e9932a 100644
--- a/pkg/analyzer/test/source/path_filter_test.dart
+++ b/pkg/analyzer/test/source/path_filter_test.dart
@@ -12,41 +12,42 @@ import '../utils.dart';
main() {
initializeTestEnvironment();
+ String root(String path) => context.absolute(context.normalize(path));
group('PathFilterTest', () {
setUp(() {});
tearDown(() {});
test('test_ignoreEverything', () {
- var filter = new PathFilter('/', ['*'], context);
+ var filter = new PathFilter(root('/'), ['*'], context);
expect(filter.ignored('a'), isTrue);
});
test('test_ignoreFile', () {
- var filter = new PathFilter('/', ['apple'], context);
+ var filter = new PathFilter(root('/'), ['apple'], context);
expect(filter.ignored('apple'), isTrue);
expect(filter.ignored('banana'), isFalse);
});
test('test_ignoreMultipleFiles', () {
- var filter = new PathFilter('/', ['apple', 'banana'], context);
+ var filter = new PathFilter(root('/'), ['apple', 'banana'], context);
expect(filter.ignored('apple'), isTrue);
expect(filter.ignored('banana'), isTrue);
});
test('test_ignoreSubDir', () {
- var filter = new PathFilter('/', ['apple/*'], context);
+ var filter = new PathFilter(root('/'), ['apple/*'], context);
expect(filter.ignored('apple/banana'), isTrue);
expect(filter.ignored('apple/banana/cantaloupe'), isFalse);
});
test('test_ignoreTree', () {
- var filter = new PathFilter('/', ['apple/**'], context);
+ var filter = new PathFilter(root('/'), ['apple/**'], context);
expect(filter.ignored('apple/banana'), isTrue);
expect(filter.ignored('apple/banana/cantaloupe'), isTrue);
});
test('test_ignoreSdkExt', () {
- var filter = new PathFilter('/', ['sdk_ext/**'], context);
+ var filter = new PathFilter(root('/'), ['sdk_ext/**'], context);
expect(filter.ignored('sdk_ext/entry.dart'), isTrue);
expect(filter.ignored('sdk_ext/lib/src/part.dart'), isTrue);
});
test('test_outsideRoot', () {
var filter =
- new PathFilter('/workspace/dart/sdk', ['sdk_ext/**'], context);
+ new PathFilter(root('/workspace/dart/sdk'), ['sdk_ext/**'], context);
expect(filter.ignored('/'), isTrue);
expect(filter.ignored('/workspace'), isTrue);
expect(filter.ignored('/workspace/dart'), isTrue);
@@ -55,7 +56,7 @@ main() {
});
test('test_relativePaths', () {
var filter =
- new PathFilter('/workspace/dart/sdk', ['sdk_ext/**'], context);
+ new PathFilter(root('/workspace/dart/sdk'), ['sdk_ext/**'], context);
expect(filter.ignored('../apple'), isTrue);
expect(filter.ignored('../sdk/main.dart'), isFalse);
expect(filter.ignored('../sdk/sdk_ext/entry.dart'), isTrue);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698