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

Unified Diff: pkg/analysis_server/test/resource_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/resource_test.dart
diff --git a/pkg/analysis_server/test/resource_test.dart b/pkg/analysis_server/test/resource_test.dart
index 409e0afd82954f4d8a807bd91d50eb6c404831a7..ec1a67d10e5a2c077038c0fa9c16faa2bf004221 100644
--- a/pkg/analysis_server/test/resource_test.dart
+++ b/pkg/analysis_server/test/resource_test.dart
@@ -329,6 +329,15 @@ main() {
expect(parent2.path, equals('/'));
expect(parent2.parent, isNull);
});
+
+ test('canonicalizePath', () {
+ expect(folder.canonicalizePath('baz'), equals('/foo/bar/baz'));
+ expect(folder.canonicalizePath('/baz'), equals('/baz'));
+ expect(folder.canonicalizePath('../baz'), equals('/foo/baz'));
+ expect(folder.canonicalizePath('/a/b/../c'), equals('/a/c'));
+ expect(folder.canonicalizePath('./baz'), equals('/foo/bar/baz'));
+ expect(folder.canonicalizePath('/a/b/./c'), equals('/a/b/c'));
+ });
});
group('_MemoryFileSource', () {

Powered by Google App Engine
This is Rietveld 408576698