OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import 'package:pathos/path.dart' as path; | 7 import 'package:pathos/path.dart' as path; |
8 | 8 |
9 import '../../../lib/src/io.dart'; | 9 import '../../../lib/src/io.dart'; |
10 import '../../descriptor.dart' as d; | 10 import '../../descriptor.dart' as d; |
(...skipping 12 matching lines...) Expand all Loading... |
23 d.libPubspec("foo", "1.2.3"), | 23 d.libPubspec("foo", "1.2.3"), |
24 // Note: empty "lib" directory. | 24 // Note: empty "lib" directory. |
25 d.dir("lib", []) | 25 d.dir("lib", []) |
26 ]) | 26 ]) |
27 ]))) | 27 ]))) |
28 ]) | 28 ]) |
29 ]).create(); | 29 ]).create(); |
30 | 30 |
31 d.appDir([dependencyMap("foo", "1.2.3")]).create(); | 31 d.appDir([dependencyMap("foo", "1.2.3")]).create(); |
32 | 32 |
33 schedulePub(args: ['install'], | 33 pubInstall(); |
34 output: new RegExp("Dependencies installed!\$")); | |
35 | 34 |
36 d.cacheDir({"foo": "1.2.3"}).validate(); | 35 d.cacheDir({"foo": "1.2.3"}).validate(); |
37 d.packagesDir({"foo": "1.2.3"}).validate(); | 36 d.packagesDir({"foo": "1.2.3"}).validate(); |
38 }); | 37 }); |
39 | 38 |
40 integration('re-installs a package if it has no pubspec', () { | 39 integration('re-installs a package if it has no pubspec', () { |
41 servePackages([packageMap("foo", "1.2.3")]); | 40 servePackages([packageMap("foo", "1.2.3")]); |
42 | 41 |
43 // Set up a cache with a broken foo package. | 42 // Set up a cache with a broken foo package. |
44 d.dir(cachePath, [ | 43 d.dir(cachePath, [ |
45 d.dir('hosted', [ | 44 d.dir('hosted', [ |
46 d.async(port.then((p) => d.dir('localhost%58$p', [ | 45 d.async(port.then((p) => d.dir('localhost%58$p', [ |
47 d.dir("foo-1.2.3", [ | 46 d.dir("foo-1.2.3", [ |
48 d.libDir("foo") | 47 d.libDir("foo") |
49 // Note: no pubspec. | 48 // Note: no pubspec. |
50 ]) | 49 ]) |
51 ]))) | 50 ]))) |
52 ]) | 51 ]) |
53 ]).create(); | 52 ]).create(); |
54 | 53 |
55 d.appDir([dependencyMap("foo", "1.2.3")]).create(); | 54 d.appDir([dependencyMap("foo", "1.2.3")]).create(); |
56 | 55 |
57 schedulePub(args: ['install'], | 56 pubInstall(); |
58 output: new RegExp("Dependencies installed!\$")); | |
59 | 57 |
60 d.cacheDir({"foo": "1.2.3"}).validate(); | 58 d.cacheDir({"foo": "1.2.3"}).validate(); |
61 d.packagesDir({"foo": "1.2.3"}).validate(); | 59 d.packagesDir({"foo": "1.2.3"}).validate(); |
62 }); | 60 }); |
63 } | 61 } |
OLD | NEW |