Chromium Code Reviews| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 } | 63 } |
| 64 | 64 |
| 65 updateCommand() { | 65 updateCommand() { |
| 66 testPub('adds a dependent package', | 66 testPub('adds a dependent package', |
| 67 cache: [ | 67 cache: [ |
| 68 dir('foo', [ | 68 dir('foo', [ |
| 69 file('foo.dart', 'main() => "foo";') | 69 file('foo.dart', 'main() => "foo";') |
| 70 ]) | 70 ]) |
| 71 ], | 71 ], |
| 72 app: dir('myapp', [ | 72 app: dir('myapp', [ |
| 73 file('pubspec', 'foo') | 73 file('pubspec', '- foo') |
|
Bob Nystrom
2012/04/25 22:59:01
Now that we have a real format, I would put the de
nweiz
2012/04/25 23:05:14
Done.
| |
| 74 ]), | 74 ]), |
| 75 args: ['update'], | 75 args: ['update'], |
| 76 expectedPackageDir: [ | 76 expectedPackageDir: [ |
| 77 dir('foo', [ | 77 dir('foo', [ |
| 78 file('foo.dart', 'main() => "foo";') | 78 file('foo.dart', 'main() => "foo";') |
| 79 ]) | 79 ]) |
| 80 ], | 80 ], |
| 81 output: ''); | 81 output: ''); |
| 82 | 82 |
| 83 testPub('adds a transitively dependent package', | 83 testPub('adds a transitively dependent package', |
| 84 cache: [ | 84 cache: [ |
| 85 dir('foo', [ | 85 dir('foo', [ |
| 86 file('foo.dart', 'main() => "foo";'), | 86 file('foo.dart', 'main() => "foo";'), |
| 87 file('pubspec', 'bar') | 87 file('pubspec', '- bar') |
| 88 ]), | 88 ]), |
| 89 dir('bar', [ | 89 dir('bar', [ |
| 90 file('bar.dart', 'main() => "bar";'), | 90 file('bar.dart', 'main() => "bar";'), |
| 91 ]) | 91 ]) |
| 92 ], | 92 ], |
| 93 app: dir('myapp', [ | 93 app: dir('myapp', [ |
| 94 file('pubspec', 'foo') | 94 file('pubspec', '- foo') |
| 95 ]), | 95 ]), |
| 96 args: ['update'], | 96 args: ['update'], |
| 97 expectedPackageDir: [ | 97 expectedPackageDir: [ |
| 98 dir('foo', [ | 98 dir('foo', [ |
| 99 file('foo.dart', 'main() => "foo";') | 99 file('foo.dart', 'main() => "foo";') |
| 100 ]), | 100 ]), |
| 101 dir('bar', [ | 101 dir('bar', [ |
| 102 file('bar.dart', 'main() => "bar";'), | 102 file('bar.dart', 'main() => "bar";'), |
| 103 ]) | 103 ]) |
| 104 ], | 104 ], |
| 105 output: ''); | 105 output: ''); |
| 106 } | 106 } |
| 107 | 107 |
| 108 versionCommand() { | 108 versionCommand() { |
| 109 testPub('displays the current version', | 109 testPub('displays the current version', |
| 110 args: ['version'], | 110 args: ['version'], |
| 111 output: ''' | 111 output: ''' |
| 112 Pub 0.0.0 | 112 Pub 0.0.0 |
| 113 '''); | 113 '''); |
| 114 } | 114 } |
| OLD | NEW |