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

Unified Diff: utils/tests/pub/path/path_posix_test.dart

Issue 11471048: Revise path library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/validator/name.dart ('k') | utils/tests/pub/path/path_windows_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/path/path_posix_test.dart
diff --git a/utils/tests/pub/path/path_posix_test.dart b/utils/tests/pub/path/path_posix_test.dart
index 3d25a2f8ec65a57491d2f18af6654ff8566cd414..f975194772b335a8a72494c9db31dc799b89cdf4 100644
--- a/utils/tests/pub/path/path_posix_test.dart
+++ b/utils/tests/pub/path/path_posix_test.dart
@@ -33,28 +33,28 @@ main() {
expect(builder.extension(r'a.b\c'), r'.b\c');
});
- test('filename', () {
- expect(builder.filename(''), '');
- expect(builder.filename('a'), 'a');
- expect(builder.filename('a/b'), 'b');
- expect(builder.filename('a/b/c'), 'c');
- expect(builder.filename('a/b.c'), 'b.c');
- expect(builder.filename('a/'), '');
- expect(builder.filename('a/.'), '.');
- expect(builder.filename(r'a/b\c'), r'b\c');
+ test('basename', () {
+ expect(builder.basename(''), '');
+ expect(builder.basename('a'), 'a');
+ expect(builder.basename('a/b'), 'b');
+ expect(builder.basename('a/b/c'), 'c');
+ expect(builder.basename('a/b.c'), 'b.c');
+ expect(builder.basename('a/'), '');
+ expect(builder.basename('a/.'), '.');
+ expect(builder.basename(r'a/b\c'), r'b\c');
});
- test('filenameWithoutExtension', () {
- expect(builder.filenameWithoutExtension(''), '');
- expect(builder.filenameWithoutExtension('a'), 'a');
- expect(builder.filenameWithoutExtension('a/b'), 'b');
- expect(builder.filenameWithoutExtension('a/b/c'), 'c');
- expect(builder.filenameWithoutExtension('a/b.c'), 'b');
- expect(builder.filenameWithoutExtension('a/'), '');
- expect(builder.filenameWithoutExtension('a/.'), '.');
- expect(builder.filenameWithoutExtension(r'a/b\c'), r'b\c');
- expect(builder.filenameWithoutExtension('a/.bashrc'), '.bashrc');
- expect(builder.filenameWithoutExtension('a/b/c.d.e'), 'c.d');
+ test('basenameWithoutExtension', () {
+ expect(builder.basenameWithoutExtension(''), '');
+ expect(builder.basenameWithoutExtension('a'), 'a');
+ expect(builder.basenameWithoutExtension('a/b'), 'b');
+ expect(builder.basenameWithoutExtension('a/b/c'), 'c');
+ expect(builder.basenameWithoutExtension('a/b.c'), 'b');
+ expect(builder.basenameWithoutExtension('a/'), '');
+ expect(builder.basenameWithoutExtension('a/.'), '.');
+ expect(builder.basenameWithoutExtension(r'a/b\c'), r'b\c');
+ expect(builder.basenameWithoutExtension('a/.bashrc'), '.bashrc');
+ expect(builder.basenameWithoutExtension('a/b/c.d.e'), 'c.d');
});
test('isAbsolute', () {
@@ -272,6 +272,7 @@ main() {
expect(builder.withoutExtension('a/.'), 'a/.');
expect(builder.withoutExtension('a/.b'), 'a/.b');
expect(builder.withoutExtension('a.b/c'), 'a.b/c');
+ expect(builder.withoutExtension(r'a.b\c'), r'a');
expect(builder.withoutExtension(r'a/b\c'), r'a/b\c');
expect(builder.withoutExtension(r'a/b\c.d'), r'a/b\c');
});
« no previous file with comments | « utils/pub/validator/name.dart ('k') | utils/tests/pub/path/path_windows_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698