| 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('dart:io'); | 7 #import('dart:io'); |
| 8 | 8 |
| 9 #import('test_pub.dart'); | 9 #import('test_pub.dart'); |
| 10 #import('../../../pkg/unittest/unittest.dart'); | 10 #import('../../../pkg/unittest/unittest.dart'); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ]).scheduleCreate(); | 88 ]).scheduleCreate(); |
| 89 | 89 |
| 90 schedulePub(args: ['install'], | 90 schedulePub(args: ['install'], |
| 91 error: const RegExp(r'Warning: Package "foo" does not have a "lib" ' | 91 error: const RegExp(r'Warning: Package "foo" does not have a "lib" ' |
| 92 'directory.'), | 92 'directory.'), |
| 93 output: const RegExp(r"Dependencies installed!$")); | 93 output: const RegExp(r"Dependencies installed!$")); |
| 94 | 94 |
| 95 run(); | 95 run(); |
| 96 }); | 96 }); |
| 97 | 97 |
| 98 test('does not warn if the root package lacks a "lib" directory', () { |
| 99 dir(appPath, [ |
| 100 appPubspec([]) |
| 101 ]).scheduleCreate(); |
| 102 |
| 103 schedulePub(args: ['install'], |
| 104 error: '', |
| 105 output: const RegExp(r"Dependencies installed!$")); |
| 106 |
| 107 run(); |
| 108 }); |
| 109 |
| 98 test('overwrites the existing packages directory', () { | 110 test('overwrites the existing packages directory', () { |
| 99 dir(appPath, [ | 111 dir(appPath, [ |
| 100 appPubspec([]), | 112 appPubspec([]), |
| 101 dir('packages', [ | 113 dir('packages', [ |
| 102 dir('foo'), | 114 dir('foo'), |
| 103 dir('myapp'), | 115 dir('myapp'), |
| 104 ]), | 116 ]), |
| 105 libDir('myapp') | 117 libDir('myapp') |
| 106 ]).scheduleCreate(); | 118 ]).scheduleCreate(); |
| 107 | 119 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 schedulePub(args: ['install'], | 255 schedulePub(args: ['install'], |
| 244 error: ''' | 256 error: ''' |
| 245 Warning: Package "myapp_name" is using a deprecated layout. | 257 Warning: Package "myapp_name" is using a deprecated layout. |
| 246 See http://www.dartlang.org/docs/pub-package-manager/package-layout.html
for details. | 258 See http://www.dartlang.org/docs/pub-package-manager/package-layout.html
for details. |
| 247 ''', | 259 ''', |
| 248 output: const RegExp(r"Dependencies installed!$")); | 260 output: const RegExp(r"Dependencies installed!$")); |
| 249 | 261 |
| 250 run(); | 262 run(); |
| 251 }); | 263 }); |
| 252 } | 264 } |
| OLD | NEW |