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

Unified Diff: pkg/analyzer/test/src/util/glob_test.dart

Issue 1448243002: Specialize Glob for the often case of suffix matching. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« pkg/analyzer/lib/src/util/glob.dart ('K') | « pkg/analyzer/lib/src/util/glob.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/util/glob_test.dart
diff --git a/pkg/analyzer/test/src/util/glob_test.dart b/pkg/analyzer/test/src/util/glob_test.dart
index d3bc531ccfd6b09213ed5c89953da835f699194e..a3e69ec8af994d846c79d4d89d1d0a68dfa0b69b 100644
--- a/pkg/analyzer/test/src/util/glob_test.dart
+++ b/pkg/analyzer/test/src/util/glob_test.dart
@@ -62,6 +62,16 @@ class GlobPosixTest {
// does not end with 'dart'
expect(glob.matches(r'/web/foo.html'), isFalse);
}
+
+ void test_starStar_star() {
+ Glob glob = new Glob(r'/', r'**/*.dart');
+ expect(glob.matches(r'foo/bar.dart'), isTrue);
+ expect(glob.matches(r'foo/bar/baz.dart'), isTrue);
+ expect(glob.matches(r'/foo/bar.dart'), isTrue);
+ expect(glob.matches(r'/foo/bar/baz.dart'), isTrue);
+ // does not end with 'dart'
+ expect(glob.matches(r'/web/foo.html'), isFalse);
+ }
}
@reflectiveTest
« pkg/analyzer/lib/src/util/glob.dart ('K') | « pkg/analyzer/lib/src/util/glob.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698