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

Unified Diff: pkg/analysis_server/test/physical_resource_provider_test.dart

Issue 367453003: Handle relative paths in the output of "pub list-package-dirs". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/physical_resource_provider_test.dart
diff --git a/pkg/analysis_server/test/physical_resource_provider_test.dart b/pkg/analysis_server/test/physical_resource_provider_test.dart
index e16fb82fe4c39994dd6aded9d1690c56993ba402..6aecaab6d16464a685f6fb2e21ad97bf2973ba17 100644
--- a/pkg/analysis_server/test/physical_resource_provider_test.dart
+++ b/pkg/analysis_server/test/physical_resource_provider_test.dart
@@ -242,6 +242,17 @@ main() {
parent = grandParent;
}
});
+
+ test('canonicalizePath', () {
+ String path2 = join(tempPath, 'folder2');
+ String path3 = join(tempPath, 'folder3');
+ expect(folder.canonicalizePath('baz'), equals(join(path, 'baz')));
+ expect(folder.canonicalizePath(path2), equals(path2));
+ expect(folder.canonicalizePath('../folder2'), equals(path2));
scheglov 2014/07/01 15:33:38 Replace '../folder2' with join?
Paul Berry 2014/07/01 16:31:41 Done.
+ expect(folder.canonicalizePath(join(path2, '..', 'folder3')), equals(path3));
+ expect(folder.canonicalizePath(join('.', 'baz')), equals(join(path, 'baz')));
+ expect(folder.canonicalizePath(join(path2, '.', 'baz')), equals(join(path2, 'baz')));
+ });
});
});
}
« no previous file with comments | « pkg/analysis_server/test/package_map_provider_test.dart ('k') | pkg/analysis_server/test/resource_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698