| 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('../../../lib/unittest/unittest.dart'); | 10 #import('../../../lib/unittest/unittest.dart'); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 installCommand() { | 85 installCommand() { |
| 86 testPub('adds a dependent package', | 86 testPub('adds a dependent package', |
| 87 sdk: [ | 87 sdk: [ |
| 88 dir('lib', [ | 88 dir('lib', [ |
| 89 dir('foo', [ | 89 dir('foo', [ |
| 90 file('foo.dart', 'main() => "foo";') | 90 file('foo.dart', 'main() => "foo";') |
| 91 ]) | 91 ]) |
| 92 ]) | 92 ]) |
| 93 ], | 93 ], |
| 94 app: dir('myapp', [ | 94 app: dir('myapp', [ |
| 95 file('pubspec', 'dependencies:\n- foo') | 95 file('pubspec', 'dependencies:\n foo:') |
| 96 ]), | 96 ]), |
| 97 args: ['install'], | 97 args: ['install'], |
| 98 expectedPackageDir: [ | 98 expectedPackageDir: [ |
| 99 dir('foo', [ | 99 dir('foo', [ |
| 100 file('foo.dart', 'main() => "foo";') | 100 file('foo.dart', 'main() => "foo";') |
| 101 ]) | 101 ]) |
| 102 ], | 102 ], |
| 103 output: ''' | 103 output: ''' |
| 104 Dependencies installed! | 104 Dependencies installed! |
| 105 '''); | 105 '''); |
| 106 | 106 |
| 107 testPub('adds a transitively dependent package', | 107 testPub('adds a transitively dependent package', |
| 108 sdk: [ | 108 sdk: [ |
| 109 dir('lib', [ | 109 dir('lib', [ |
| 110 dir('foo', [ | 110 dir('foo', [ |
| 111 file('foo.dart', 'main() => "foo";'), | 111 file('foo.dart', 'main() => "foo";'), |
| 112 file('pubspec', 'dependencies:\n- bar') | 112 file('pubspec', 'dependencies:\n bar:') |
| 113 ]), | 113 ]), |
| 114 dir('bar', [ | 114 dir('bar', [ |
| 115 file('bar.dart', 'main() => "bar";'), | 115 file('bar.dart', 'main() => "bar";'), |
| 116 ]) | 116 ]) |
| 117 ]) | 117 ]) |
| 118 ], | 118 ], |
| 119 app: dir('myapp', [ | 119 app: dir('myapp', [ |
| 120 file('pubspec', 'dependencies:\n- foo') | 120 file('pubspec', 'dependencies:\n foo:') |
| 121 ]), | 121 ]), |
| 122 args: ['install'], | 122 args: ['install'], |
| 123 expectedPackageDir: [ | 123 expectedPackageDir: [ |
| 124 dir('foo', [ | 124 dir('foo', [ |
| 125 file('foo.dart', 'main() => "foo";') | 125 file('foo.dart', 'main() => "foo";') |
| 126 ]), | 126 ]), |
| 127 dir('bar', [ | 127 dir('bar', [ |
| 128 file('bar.dart', 'main() => "bar";'), | 128 file('bar.dart', 'main() => "bar";'), |
| 129 ]) | 129 ]) |
| 130 ], | 130 ], |
| 131 output: ''' | 131 output: ''' |
| 132 Dependencies installed! | 132 Dependencies installed! |
| 133 '''); | 133 '''); |
| 134 } | 134 } |
| 135 | 135 |
| 136 versionCommand() { | 136 versionCommand() { |
| 137 testPub('displays the current version', | 137 testPub('displays the current version', |
| 138 args: ['version'], | 138 args: ['version'], |
| 139 output: VERSION_STRING); | 139 output: VERSION_STRING); |
| 140 } | 140 } |
| OLD | NEW |