Chromium Code Reviews

Side by Side Diff: test/glob_test.dart

Issue 1773293002: Fix case-insensitive absolute listing. (Closed) Base URL: git@github.com:dart-lang/glob@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:glob/glob.dart'; 5 import 'package:glob/glob.dart';
6 import 'package:path/path.dart' as p;
Bob Nystrom 2016/03/08 21:40:31 Not needed?
nweiz 2016/03/08 22:01:15 It is; this test was crashing before.
6 import 'package:test/test.dart'; 7 import 'package:test/test.dart';
7 8
8 void main() { 9 void main() {
9 group("Glob.quote()", () { 10 group("Glob.quote()", () {
10 test("quotes all active characters", () { 11 test("quotes all active characters", () {
11 expect(Glob.quote("*{[?\\}],-"), equals(r"\*\{\[\?\\\}\]\,\-")); 12 expect(Glob.quote("*{[?\\}],-"), equals(r"\*\{\[\?\\\}\]\,\-"));
12 }); 13 });
13 14
14 test("doesn't quote inactive characters", () { 15 test("doesn't quote inactive characters", () {
15 expect(Glob.quote("abc~`_+="), equals("abc~`_+=")); 16 expect(Glob.quote("abc~`_+="), equals("abc~`_+="));
(...skipping 85 matching lines...)
101 expect("FOO", isNot(contains(new Glob("foo", context: p.url)))); 102 expect("FOO", isNot(contains(new Glob("foo", context: p.url))));
102 expect("foo", isNot(contains(new Glob("FOO", context: p.url)))); 103 expect("foo", isNot(contains(new Glob("FOO", context: p.url))));
103 }); 104 });
104 105
105 test("globs are case-insensitive by default for Windows contexts", () { 106 test("globs are case-insensitive by default for Windows contexts", () {
106 expect("foo", contains(new Glob("foo", context: p.windows))); 107 expect("foo", contains(new Glob("foo", context: p.windows)));
107 expect("FOO", contains(new Glob("foo", context: p.windows))); 108 expect("FOO", contains(new Glob("foo", context: p.windows)));
108 expect("foo", contains(new Glob("FOO", context: p.windows))); 109 expect("foo", contains(new Glob("FOO", context: p.windows)));
109 }); 110 });
110 } 111 }
OLDNEW
« lib/src/list_tree.dart ('K') | « lib/src/list_tree.dart ('k') | test/list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine