| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:io'; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import '../../../../../pkg/path/lib/path.dart' as path; |
| 8 | 8 |
| 9 import '../../test_pub.dart'; | 9 import '../../test_pub.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 integration('fails gracefully if the url does not resolve', () { | 12 initConfig(); |
| 13 integration('path dependency to non-existent directory', () { |
| 14 var badPath = path.join(sandboxDir, "bad_path"); |
| 15 |
| 13 dir(appPath, [ | 16 dir(appPath, [ |
| 14 pubspec({ | 17 pubspec({ |
| 15 "name": "myapp", | 18 "name": "myapp", |
| 16 "dependencies": { | 19 "dependencies": { |
| 17 "foo": { | 20 "foo": {"path": badPath} |
| 18 "hosted": { | 21 } |
| 19 "name": "foo", | |
| 20 "url": "http://pub.invalid" | |
| 21 } | |
| 22 } | |
| 23 } | |
| 24 }) | 22 }) |
| 25 ]).scheduleCreate(); | 23 ]).scheduleCreate(); |
| 26 | 24 |
| 27 schedulePub(args: ['install'], | 25 schedulePub(args: ['install'], |
| 28 error: new RegExp('Could not resolve URL "http://pub.invalid".'), | 26 error: |
| 27 new RegExp("Could not find package 'foo' at '$badPath'."), |
| 29 exitCode: 1); | 28 exitCode: 1); |
| 30 }); | 29 }); |
| 31 } | 30 } |
| OLD | NEW |