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; | 5 library pathos_posix_test; |
6 | 6 |
7 import 'dart:io' as io; | 7 import 'dart:io' as io; |
8 | 8 |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 import 'package:path/path.dart' as path; | 10 import 'package:pathos/path.dart' as path; |
11 | 11 |
12 main() { | 12 main() { |
13 var builder = new path.Builder(style: path.Style.posix, root: '/root/path'); | 13 var builder = new path.Builder(style: path.Style.posix, root: '/root/path'); |
14 | 14 |
15 if (new path.Builder().style == path.Style.posix) { | 15 if (new path.Builder().style == path.Style.posix) { |
16 group('absolute', () { | 16 group('absolute', () { |
17 expect(path.absolute('a/b.txt'), path.join(path.current, 'a/b.txt')); | 17 expect(path.absolute('a/b.txt'), path.join(path.current, 'a/b.txt')); |
18 expect(path.absolute('/a/b.txt'), '/a/b.txt'); | 18 expect(path.absolute('/a/b.txt'), '/a/b.txt'); |
19 }); | 19 }); |
20 } | 20 } |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 expect(builder.withoutExtension('a/.'), 'a/.'); | 364 expect(builder.withoutExtension('a/.'), 'a/.'); |
365 expect(builder.withoutExtension('a/.b'), 'a/.b'); | 365 expect(builder.withoutExtension('a/.b'), 'a/.b'); |
366 expect(builder.withoutExtension('a.b/c'), 'a.b/c'); | 366 expect(builder.withoutExtension('a.b/c'), 'a.b/c'); |
367 expect(builder.withoutExtension(r'a.b\c'), r'a'); | 367 expect(builder.withoutExtension(r'a.b\c'), r'a'); |
368 expect(builder.withoutExtension(r'a/b\c'), r'a/b\c'); | 368 expect(builder.withoutExtension(r'a/b\c'), r'a/b\c'); |
369 expect(builder.withoutExtension(r'a/b\c.d'), r'a/b\c'); | 369 expect(builder.withoutExtension(r'a/b\c.d'), r'a/b\c'); |
370 expect(builder.withoutExtension('a/b.c/'), 'a/b/'); | 370 expect(builder.withoutExtension('a/b.c/'), 'a/b/'); |
371 expect(builder.withoutExtension('a/b.c//'), 'a/b//'); | 371 expect(builder.withoutExtension('a/b.c//'), 'a/b//'); |
372 }); | 372 }); |
373 } | 373 } |
OLD | NEW |