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

Unified Diff: sdk/lib/_internal/pub/test/get/path/relative_path_test.dart

Issue 34803006: Make pubspec.lock keep relative path if it is originally specified as relative in pubspec.yaml (iss… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve code according to the code review comments Created 7 years, 1 month 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 | « sdk/lib/_internal/pub/lib/src/source/path.dart ('k') | sdk/lib/_internal/pub/test/lock_file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/get/path/relative_path_test.dart
diff --git a/sdk/lib/_internal/pub/test/get/path/relative_path_test.dart b/sdk/lib/_internal/pub/test/get/path/relative_path_test.dart
index 8313f3e98db5ffa61b1627b1dd0b529a5943dbcb..040ba7d56a18935054e73d632d73ffb2b8d7a67e 100644
--- a/sdk/lib/_internal/pub/test/get/path/relative_path_test.dart
+++ b/sdk/lib/_internal/pub/test/get/path/relative_path_test.dart
@@ -2,6 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE d.file.
+import 'package:path/path.dart' as path;
+import 'package:scheduled_test/scheduled_test.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../../lib/src/lock_file.dart';
+import '../../../lib/src/source_registry.dart';
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
@@ -59,4 +65,27 @@ main() {
])
]).validate();
});
+
+ integration("relative path preserved in the lockfile", () {
+ d.dir("foo", [
+ d.libDir("foo"),
+ d.libPubspec("foo", "0.0.1")
+ ]).create();
+
+ d.dir(appPath, [
+ d.appPubspec({
+ "foo": {"path": "../foo"}
+ })
+ ]).create();
+
+ pubGet();
+
+ schedule(() {
+ var lockfilePath = path.join(sandboxDir, appPath, "pubspec.lock");
+ var lockfile = new LockFile.load(lockfilePath, new SourceRegistry());
+ var description = lockfile.packages["foo"].description;
+
+ expect(path.isRelative(description["path"]), isTrue);
+ });
+ });
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/source/path.dart ('k') | sdk/lib/_internal/pub/test/lock_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698