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 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 }); | 68 }); |
69 | 69 |
70 integration('does not add a package if it does not have a "lib" ' | 70 integration('does not add a package if it does not have a "lib" ' |
71 'directory', () { | 71 'directory', () { |
72 // Using a path source, but this should be true of all sources. | 72 // Using a path source, but this should be true of all sources. |
73 d.dir('foo', [ | 73 d.dir('foo', [ |
74 d.libPubspec('foo', '0.0.0-not.used') | 74 d.libPubspec('foo', '0.0.0-not.used') |
75 ]).create(); | 75 ]).create(); |
76 | 76 |
77 d.dir(appPath, [ | 77 d.dir(appPath, [ |
78 d.pubspec({"name": "myapp", "dependencies": {"foo": {"path": "../foo"}}}
) | 78 d.appPubspec({"foo": {"path": "../foo"}}) |
79 ]).create(); | 79 ]).create(); |
80 | 80 |
81 pubCommand(command); | 81 pubCommand(command); |
82 | 82 |
83 d.packagesDir({"foo": null}).validate(); | 83 d.packagesDir({"foo": null}).validate(); |
84 }); | 84 }); |
85 | 85 |
86 integration('reports a solver failure', () { | 86 integration('reports a solver failure', () { |
87 // myapp depends on foo and bar which both depend on baz with mismatched | 87 // myapp depends on foo and bar which both depend on baz with mismatched |
88 // descriptions. | 88 // descriptions. |
(...skipping 10 matching lines...) Expand all Loading... |
99 ]), | 99 ]), |
100 d.dir('baz1', [ | 100 d.dir('baz1', [ |
101 d.libPubspec('baz', '0.0.0') | 101 d.libPubspec('baz', '0.0.0') |
102 ]), | 102 ]), |
103 d.dir('baz2', [ | 103 d.dir('baz2', [ |
104 d.libPubspec('baz', '0.0.0') | 104 d.libPubspec('baz', '0.0.0') |
105 ]) | 105 ]) |
106 ]).create(); | 106 ]).create(); |
107 | 107 |
108 d.dir(appPath, [ | 108 d.dir(appPath, [ |
109 d.pubspec({"name": "myapp", "dependencies": { | 109 d.appPubspec({ |
110 "foo": {"path": "../deps/foo"}, | 110 "foo": {"path": "../deps/foo"}, |
111 "bar": {"path": "../deps/bar"} | 111 "bar": {"path": "../deps/bar"} |
112 }}) | 112 }) |
113 ]).create(); | 113 ]).create(); |
114 | 114 |
115 pubCommand(command, | 115 pubCommand(command, |
116 error: new RegExp("^Incompatible dependencies on 'baz':\n")); | 116 error: new RegExp("^Incompatible dependencies on 'baz':\n")); |
117 }); | 117 }); |
118 }); | 118 }); |
119 } | 119 } |
OLD | NEW |