| 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:path/path.dart' as path; | 7 import 'package:path/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 10 matching lines...) Expand all Loading... |
| 21 d.async(port.then((p) => d.dir('localhost%58$p', [ | 21 d.async(port.then((p) => d.dir('localhost%58$p', [ |
| 22 d.dir("foo-1.2.3", [ | 22 d.dir("foo-1.2.3", [ |
| 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({"foo": "1.2.3"}).create(); |
| 32 | 32 |
| 33 pubInstall(); | 33 pubInstall(); |
| 34 | 34 |
| 35 d.cacheDir({"foo": "1.2.3"}).validate(); | 35 d.cacheDir({"foo": "1.2.3"}).validate(); |
| 36 d.packagesDir({"foo": "1.2.3"}).validate(); | 36 d.packagesDir({"foo": "1.2.3"}).validate(); |
| 37 }); | 37 }); |
| 38 | 38 |
| 39 integration('re-installs a package if it has no pubspec', () { | 39 integration('re-installs a package if it has no pubspec', () { |
| 40 servePackages([packageMap("foo", "1.2.3")]); | 40 servePackages([packageMap("foo", "1.2.3")]); |
| 41 | 41 |
| 42 // Set up a cache with a broken foo package. | 42 // Set up a cache with a broken foo package. |
| 43 d.dir(cachePath, [ | 43 d.dir(cachePath, [ |
| 44 d.dir('hosted', [ | 44 d.dir('hosted', [ |
| 45 d.async(port.then((p) => d.dir('localhost%58$p', [ | 45 d.async(port.then((p) => d.dir('localhost%58$p', [ |
| 46 d.dir("foo-1.2.3", [ | 46 d.dir("foo-1.2.3", [ |
| 47 d.libDir("foo") | 47 d.libDir("foo") |
| 48 // Note: no pubspec. | 48 // Note: no pubspec. |
| 49 ]) | 49 ]) |
| 50 ]))) | 50 ]))) |
| 51 ]) | 51 ]) |
| 52 ]).create(); | 52 ]).create(); |
| 53 | 53 |
| 54 d.appDir([dependencyMap("foo", "1.2.3")]).create(); | 54 d.appDir({"foo": "1.2.3"}).create(); |
| 55 | 55 |
| 56 pubInstall(); | 56 pubInstall(); |
| 57 | 57 |
| 58 d.cacheDir({"foo": "1.2.3"}).validate(); | 58 d.cacheDir({"foo": "1.2.3"}).validate(); |
| 59 d.packagesDir({"foo": "1.2.3"}).validate(); | 59 d.packagesDir({"foo": "1.2.3"}).validate(); |
| 60 }); | 60 }); |
| 61 } | 61 } |
| OLD | NEW |