| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analyzer.test.src.util.glob_test; | 5 library analyzer.test.src.util.glob_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/util/glob.dart'; | 7 import 'package:analyzer/src/util/glob.dart'; |
| 8 import 'package:test/test.dart'; | 8 import 'package:test/test.dart'; |
| 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 10 | 10 |
| 11 import '../../utils.dart'; | |
| 12 | |
| 13 main() { | 11 main() { |
| 14 initializeTestEnvironment(); | |
| 15 defineReflectiveSuite(() { | 12 defineReflectiveSuite(() { |
| 16 defineReflectiveTests(GlobPosixTest); | 13 defineReflectiveTests(GlobPosixTest); |
| 17 defineReflectiveTests(GlobWindowsTest); | 14 defineReflectiveTests(GlobWindowsTest); |
| 18 }); | 15 }); |
| 19 } | 16 } |
| 20 | 17 |
| 21 @reflectiveTest | 18 @reflectiveTest |
| 22 class GlobPosixTest { | 19 class GlobPosixTest { |
| 23 void test_case() { | 20 void test_case() { |
| 24 Glob glob = new Glob(r'\', r'**.DaRt'); | 21 Glob glob = new Glob(r'\', r'**.DaRt'); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void test_starStar() { | 123 void test_starStar() { |
| 127 Glob glob = new Glob(r'\', r'**.dart'); | 124 Glob glob = new Glob(r'\', r'**.dart'); |
| 128 expect(glob.matches(r'foo\bar.dart'), isTrue); | 125 expect(glob.matches(r'foo\bar.dart'), isTrue); |
| 129 expect(glob.matches(r'foo\bar\baz.dart'), isTrue); | 126 expect(glob.matches(r'foo\bar\baz.dart'), isTrue); |
| 130 expect(glob.matches(r'C:\foo\bar.dart'), isTrue); | 127 expect(glob.matches(r'C:\foo\bar.dart'), isTrue); |
| 131 expect(glob.matches(r'C:\foo\bar\baz.dart'), isTrue); | 128 expect(glob.matches(r'C:\foo\bar\baz.dart'), isTrue); |
| 132 // does not end with 'dart' | 129 // does not end with 'dart' |
| 133 expect(glob.matches(r'C:\web\foo.html'), isFalse); | 130 expect(glob.matches(r'C:\web\foo.html'), isFalse); |
| 134 } | 131 } |
| 135 } | 132 } |
| OLD | NEW |