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); |
+ }); |
+ }); |
} |