Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 path.test.windows_test; | 5 library path.test.windows_test; |
| 6 | 6 |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:test/test.dart'; |
| 8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
| 9 | 9 |
| 10 import 'utils.dart'; | 10 import 'utils.dart'; |
| 11 | 11 |
| 12 main() { | 12 main() { |
| 13 var context = | 13 var context = |
| 14 new path.Context(style: path.Style.windows, current: r'C:\root\path'); | 14 new path.Context(style: path.Style.windows, current: r'C:\root\path'); |
| 15 | 15 |
| 16 group('separator', () { | 16 test('separator', () { |
|
Bob Nystrom
2015/07/16 15:42:16
Oops.
| |
| 17 expect(context.separator, '\\'); | 17 expect(context.separator, '\\'); |
| 18 }); | 18 }); |
| 19 | 19 |
| 20 test('extension', () { | 20 test('extension', () { |
| 21 expect(context.extension(''), ''); | 21 expect(context.extension(''), ''); |
| 22 expect(context.extension('.'), ''); | 22 expect(context.extension('.'), ''); |
| 23 expect(context.extension('..'), ''); | 23 expect(context.extension('..'), ''); |
| 24 expect(context.extension('a/..'), ''); | 24 expect(context.extension('a/..'), ''); |
| 25 expect(context.extension('foo.dart'), '.dart'); | 25 expect(context.extension('foo.dart'), '.dart'); |
| 26 expect(context.extension('foo.dart.js'), '.js'); | 26 expect(context.extension('foo.dart.js'), '.js'); |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 667 | 667 |
| 668 test('with a root-relative URI', () { | 668 test('with a root-relative URI', () { |
| 669 expect(context.prettyUri('/D:/a/b'), r'D:\a\b'); | 669 expect(context.prettyUri('/D:/a/b'), r'D:\a\b'); |
| 670 }); | 670 }); |
| 671 | 671 |
| 672 test('with a Uri object', () { | 672 test('with a Uri object', () { |
| 673 expect(context.prettyUri(Uri.parse('a/b')), r'a\b'); | 673 expect(context.prettyUri(Uri.parse('a/b')), r'a\b'); |
| 674 }); | 674 }); |
| 675 }); | 675 }); |
| 676 } | 676 } |
| OLD | NEW |