| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 ]).scheduleCreate(); | 86 ]).scheduleCreate(); |
| 87 | 87 |
| 88 schedulePub(args: ['install'], | 88 schedulePub(args: ['install'], |
| 89 error: const RegExp(@'Warning: Package "foo" does not have a "lib" ' | 89 error: const RegExp(@'Warning: Package "foo" does not have a "lib" ' |
| 90 'directory.'), | 90 'directory.'), |
| 91 output: const RegExp(@"Dependencies installed!$")); | 91 output: const RegExp(@"Dependencies installed!$")); |
| 92 | 92 |
| 93 run(); | 93 run(); |
| 94 }); | 94 }); |
| 95 | 95 |
| 96 test('overwrites the existing packages directory', () { |
| 97 dir(appPath, [ |
| 98 appPubspec([]), |
| 99 dir('packages', [ |
| 100 dir('foo'), |
| 101 dir('myapp'), |
| 102 ]), |
| 103 libDir('myapp') |
| 104 ]).scheduleCreate(); |
| 105 |
| 106 schedulePub(args: ['install'], |
| 107 output: const RegExp(@"Dependencies installed!$")); |
| 108 |
| 109 dir(packagesPath, [ |
| 110 nothing('foo'), |
| 111 dir('myapp', [file('myapp.dart', 'main() => "myapp";')]) |
| 112 ]).scheduleValidate(); |
| 113 |
| 114 run(); |
| 115 }); |
| 116 |
| 96 group('creates a packages directory in', () { | 117 group('creates a packages directory in', () { |
| 97 test('"test/" and its subdirectories', () { | 118 test('"test/" and its subdirectories', () { |
| 98 dir(appPath, [ | 119 dir(appPath, [ |
| 99 appPubspec([]), | 120 appPubspec([]), |
| 100 libDir('foo'), | 121 libDir('foo'), |
| 101 dir("test", [dir("subtest")]) | 122 dir("test", [dir("subtest")]) |
| 102 ]).scheduleCreate(); | 123 ]).scheduleCreate(); |
| 103 | 124 |
| 104 schedulePub(args: ['install'], | 125 schedulePub(args: ['install'], |
| 105 output: const RegExp(@"Dependencies installed!$")); | 126 output: const RegExp(@"Dependencies installed!$")); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 schedulePub(args: ['install'], | 211 schedulePub(args: ['install'], |
| 191 error: ''' | 212 error: ''' |
| 192 Warning: Package "myapp_name" is using a deprecated layout. | 213 Warning: Package "myapp_name" is using a deprecated layout. |
| 193 See http://www.dartlang.org/docs/pub-package-manager/package-layout.html
for details. | 214 See http://www.dartlang.org/docs/pub-package-manager/package-layout.html
for details. |
| 194 ''', | 215 ''', |
| 195 output: const RegExp(@"Dependencies installed!$")); | 216 output: const RegExp(@"Dependencies installed!$")); |
| 196 | 217 |
| 197 run(); | 218 run(); |
| 198 }); | 219 }); |
| 199 } | 220 } |
| OLD | NEW |