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

Unified Diff: test/packages_file_test.dart

Issue 1228093003: Fix several package spec bugs. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years, 5 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
« test/descriptor/packages.dart ('K') | « test/descriptor/packages.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/packages_file_test.dart
diff --git a/test/packages_file_test.dart b/test/packages_file_test.dart
index 533b09326a6ee2c1da5478368e0cdc0b111be048..ef810f08e3a9354521772935c643373d04cba3c1 100644
--- a/test/packages_file_test.dart
+++ b/test/packages_file_test.dart
@@ -16,12 +16,15 @@ main() {
deps: {"bar": "3.2.1"}, contents: [d.dir("lib", [])]);
});
- d.appDir({"foo": "1.2.3"}).create();
+ d.dir(appPath, [
+ d.appPubspec({"foo": "1.2.3"}),
+ d.dir('lib')
+ ]).create();
pubCommand(command);
d.dir(appPath, [d.packagesFile({
- "foo": "1.2.3", "bar": "3.2.1", "baz": "2.2.2", "myapp": "0.0.0"})])
+ "foo": "1.2.3", "bar": "3.2.1", "baz": "2.2.2", "myapp": "."})])
.validate();
});
@@ -34,7 +37,10 @@ main() {
deps: {"bar": "3.2.1"}, contents: [d.dir("lib", [])]);
});
- d.appDir({"foo": "1.2.3"}).create();
+ d.dir(appPath, [
+ d.appPubspec({"foo": "1.2.3"}),
+ d.dir('lib')
+ ]).create();
var oldFile = d.dir(appPath, [d.packagesFile({"notFoo": "9.9.9"})]);
oldFile.create();
@@ -43,12 +49,15 @@ main() {
pubCommand(command);
d.dir(appPath, [d.packagesFile({
- "foo": "1.2.3", "bar": "3.2.1", "baz": "2.2.2", "myapp": "0.0.0"})])
+ "foo": "1.2.3", "bar": "3.2.1", "baz": "2.2.2", "myapp": "."})])
.validate();
});
integration('.packages file is not created if pub command fails', () {
- d.appDir({"foo": "1.2.3"}).create();
+ d.dir(appPath, [
+ d.appPubspec({"foo": "1.2.3"}),
+ d.dir('lib')
+ ]).create();
pubCommand(command, args: ['--offline'],
error: "Could not find package foo in cache.\n");
@@ -76,14 +85,18 @@ main() {
"dependency_overrides": {
"baz": {"path": "../local_baz"},
}
- })
+ }),
+ d.dir('lib')
]).create();
pubCommand(command);
- d.dir(appPath, [d.packagesFile({"myapp": "0.0.0",
- "baz": "../local_baz"})]).validate();
+ d.dir(appPath, [
+ d.packagesFile({
+ "myapp": ".",
+ "baz": "../local_baz"
+ })
+ ]).validate();
});
-
});
}
« test/descriptor/packages.dart ('K') | « test/descriptor/packages.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698