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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/no_package_symlinks_test.dart

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 import 'package:scheduled_test/scheduled_test.dart';
2 import 'descriptor.dart' as d;
3 import 'test_pub.dart';
4 main() {
5 initConfig();
6 forBothPubGetAndUpgrade((command) {
7 group("with --no-package-symlinks", () {
8 integration("installs hosted dependencies to the cache", () {
9 servePackages((builder) {
10 builder.serve("foo", "1.0.0");
11 builder.serve("bar", "1.0.0");
12 });
13 d.appDir({
14 "foo": "any",
15 "bar": "any"
16 }).create();
17 pubCommand(command, args: ["--no-package-symlinks"]);
18 d.nothing("$appPath/packages").validate();
19 d.hostedCache(
20 [
21 d.dir(
22 "foo-1.0.0",
23 [d.dir("lib", [d.file("foo.dart", 'main() => "foo 1.0.0";')] )]),
24 d.dir(
25 "bar-1.0.0",
26 [d.dir("lib", [d.file("bar.dart", 'main() => "bar 1.0.0";')] )])]).validate();
27 });
28 integration("installs git dependencies to the cache", () {
29 ensureGit();
30 d.git(
31 'foo.git',
32 [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
33 d.appDir({
34 "foo": {
35 "git": "../foo.git"
36 }
37 }).create();
38 pubCommand(command, args: ["--no-package-symlinks"]);
39 d.nothing("$appPath/packages").validate();
40 d.dir(
41 cachePath,
42 [
43 d.dir(
44 'git',
45 [
46 d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
47 d.gitPackageRevisionCacheDir('foo')])]).validate();
48 });
49 integration("locks path dependencies", () {
50 d.dir("foo", [d.libDir("foo"), d.libPubspec("foo", "0.0.1")]).create();
51 d.dir(appPath, [d.appPubspec({
52 "foo": {
53 "path": "../foo"
54 }
55 })]).create();
56 pubCommand(command, args: ["--no-package-symlinks"]);
57 d.nothing("$appPath/packages").validate();
58 d.matcherFile("$appPath/pubspec.lock", contains("foo"));
59 });
60 integration("removes package directories near entrypoints", () {
61 d.dir(
62 appPath,
63 [
64 d.appPubspec(),
65 d.dir("packages"),
66 d.dir("bin/packages"),
67 d.dir("web/packages"),
68 d.dir("web/subdir/packages")]).create();
69 pubCommand(command, args: ["--no-package-symlinks"]);
70 d.dir(
71 appPath,
72 [
73 d.nothing("packages"),
74 d.nothing("bin/packages"),
75 d.nothing("web/packages"),
76 d.nothing("web/subdir/packages")]).validate();
77 });
78 integration(
79 "doesn't remove package directories that pub wouldn't " "generate",
80 () {
81 d.dir(
82 appPath,
83 [
84 d.appPubspec(),
85 d.dir("packages"),
86 d.dir("bin/subdir/packages"),
87 d.dir("lib/packages")]).create();
88 pubCommand(command, args: ["--no-package-symlinks"]);
89 d.dir(
90 appPath,
91 [
92 d.nothing("packages"),
93 d.dir("bin/subdir/packages"),
94 d.dir("lib/packages")]).validate();
95 });
96 });
97 });
98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698