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

Unified Diff: test/glob_test.dart

Issue 1491003002: Add a caseSensitive flag to new Glob(). (Closed) Base URL: git@github.com:dart-lang/glob@master
Patch Set: Code review changes Created 5 years 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 | « pubspec.yaml ('k') | test/list_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/glob_test.dart
diff --git a/test/glob_test.dart b/test/glob_test.dart
index a742f20fd9ca2abc024ddfd477859ae9c8544696..f82106a70c7f036a68b344b412e62762f696f4cc 100644
--- a/test/glob_test.dart
+++ b/test/glob_test.dart
@@ -91,4 +91,20 @@ void main() {
expect(() => match.groups([1]), throwsRangeError);
});
});
+
+ test("globs are case-sensitive by default for Posix and URL contexts", () {
+ expect("foo", contains(new Glob("foo", context: p.posix)));
+ expect("FOO", isNot(contains(new Glob("foo", context: p.posix))));
+ expect("foo", isNot(contains(new Glob("FOO", context: p.posix))));
+
+ expect("foo", contains(new Glob("foo", context: p.url)));
+ expect("FOO", isNot(contains(new Glob("foo", context: p.url))));
+ expect("foo", isNot(contains(new Glob("FOO", context: p.url))));
+ });
+
+ test("globs are case-insensitive by default for Windows contexts", () {
+ expect("foo", contains(new Glob("foo", context: p.windows)));
+ expect("FOO", contains(new Glob("foo", context: p.windows)));
+ expect("foo", contains(new Glob("FOO", context: p.windows)));
+ });
}
« no previous file with comments | « pubspec.yaml ('k') | test/list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698