-
Notifications
You must be signed in to change notification settings - Fork 224
/
stay_locked_if_new_is_satisfied_test.dart
45 lines (36 loc) · 1.21 KB
/
stay_locked_if_new_is_satisfied_test.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
main() {
integration("doesn't unlock dependencies if a new dependency is already "
"satisfied", () {
servePackages((builder) {
builder.serve("foo", "1.0.0", deps: {"bar": "<2.0.0"});
builder.serve("bar", "1.0.0", deps: {"baz": "<2.0.0"});
builder.serve("baz", "1.0.0");
});
d.appDir({"foo": "any"}).create();
pubGet();
d.packagesDir({
"foo": "1.0.0",
"bar": "1.0.0",
"baz": "1.0.0"
}).validate();
globalPackageServer.add((builder) {
builder.serve("foo", "2.0.0", deps: {"bar": "<3.0.0"});
builder.serve("bar", "2.0.0", deps: {"baz": "<3.0.0"});
builder.serve("baz", "2.0.0");
builder.serve("newdep", "2.0.0", deps: {"baz": ">=1.0.0"});
});
d.appDir({"foo": "any", "newdep": "any"}).create();
pubGet();
d.packagesDir({
"foo": "1.0.0",
"bar": "1.0.0",
"baz": "1.0.0",
"newdep": "2.0.0"
}).validate();
});
}