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

Side by Side Diff: test/match_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
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:glob/src/utils.dart'; 6 import 'package:glob/src/utils.dart';
7 import 'package:path/path.dart' as p; 7 import 'package:path/path.dart' as p;
8 import 'package:unittest/unittest.dart'; 8 import 'package:test/test.dart';
9 9
10 const RAW_ASCII_WITHOUT_SLASH = "\t\n\r !\"#\$%&'()*+`-.0123456789:;<=>?@ABCDEF" 10 const RAW_ASCII_WITHOUT_SLASH = "\t\n\r !\"#\$%&'()*+`-.0123456789:;<=>?@ABCDEF"
11 "GHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"; 11 "GHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~";
12 12
13 // URL-encode the path for a URL context. 13 // URL-encode the path for a URL context.
14 final asciiWithoutSlash = p.style == p.Style.url ? 14 final asciiWithoutSlash = p.style == p.Style.url ?
15 Uri.encodeFull(RAW_ASCII_WITHOUT_SLASH) : RAW_ASCII_WITHOUT_SLASH; 15 Uri.encodeFull(RAW_ASCII_WITHOUT_SLASH) : RAW_ASCII_WITHOUT_SLASH;
16 16
17 void main() { 17 void main() {
18 test("literals match exactly", () { 18 test("literals match exactly", () {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 expect(r"http://foo.com/bar", 285 expect(r"http://foo.com/bar",
286 contains(new Glob("http://**", context: p.url))); 286 contains(new Glob("http://**", context: p.url)));
287 expect(r"http://foo.com/bar", 287 expect(r"http://foo.com/bar",
288 contains(new Glob("http://foo.com/**", context: p.url))); 288 contains(new Glob("http://foo.com/**", context: p.url)));
289 289
290 expect("/foo/bar", contains(new Glob("/foo/bar", context: p.url))); 290 expect("/foo/bar", contains(new Glob("/foo/bar", context: p.url)));
291 expect("/foo/bar", isNot(contains(new Glob("**", context: p.url)))); 291 expect("/foo/bar", isNot(contains(new Glob("**", context: p.url))));
292 expect("/foo/bar", contains(new Glob("/**", context: p.url))); 292 expect("/foo/bar", contains(new Glob("/**", context: p.url)));
293 }); 293 });
294 } 294 }
OLDNEW
« .test_config ('K') | « test/glob_test.dart ('k') | test/parse_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698