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

Side by Side Diff: test/parse_test.dart

Issue 1234433006: Upgrade to the new test runner. (Closed) Base URL: git@github.com:dart-lang/glob@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« .test_config ('K') | « test/match_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; 6 import 'package:path/path.dart' as p;
7 import 'package:unittest/unittest.dart'; 7 import 'package:test/test.dart';
8 8
9 void main() { 9 void main() {
10 test("supports backslash-escaped characters", () { 10 test("supports backslash-escaped characters", () {
11 expect(r"*[]{,}?()", contains(new Glob(r"\*\[\]\{\,\}\?\(\)"))); 11 expect(r"*[]{,}?()", contains(new Glob(r"\*\[\]\{\,\}\?\(\)")));
12 if (p.style != p.Style.windows) { 12 if (p.style != p.Style.windows) {
13 expect(r"foo\bar", contains(new Glob(r"foo\\bar"))); 13 expect(r"foo\bar", contains(new Glob(r"foo\\bar")));
14 } 14 }
15 }); 15 });
16 16
17 test("disallows an empty glob", () { 17 test("disallows an empty glob", () {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 test("disallows dangling ] in options", () { 87 test("disallows dangling ] in options", () {
88 expect(() => new Glob(r"{abc]}"), throwsFormatException); 88 expect(() => new Glob(r"{abc]}"), throwsFormatException);
89 }); 89 });
90 }); 90 });
91 91
92 test("disallows unescaped parens", () { 92 test("disallows unescaped parens", () {
93 expect(() => new Glob("foo(bar"), throwsFormatException); 93 expect(() => new Glob("foo(bar"), throwsFormatException);
94 expect(() => new Glob("foo)bar"), throwsFormatException); 94 expect(() => new Glob("foo)bar"), throwsFormatException);
95 }); 95 });
96 } 96 }
OLDNEW
« .test_config ('K') | « test/match_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698