OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import 'package:path/path.dart' as p; |
| 3 import 'package:scheduled_test/scheduled_test.dart'; |
| 4 import '../descriptor.dart' as d; |
| 5 import '../test_pub.dart'; |
| 6 main() { |
| 7 initConfig(); |
| 8 integration( |
| 9 "doesn't recreate a snapshot when no dependencies of a package " "have cha
nged", |
| 10 () { |
| 11 servePackages((builder) { |
| 12 builder.serve("foo", "1.2.3", deps: { |
| 13 "bar": "any" |
| 14 }, |
| 15 contents: [ |
| 16 d.dir("bin", [d.file("hello.dart", "void main() => print('hello!')
;")])]); |
| 17 builder.serve("bar", "1.2.3"); |
| 18 }); |
| 19 d.appDir({ |
| 20 "foo": "1.2.3" |
| 21 }).create(); |
| 22 pubGet(output: contains("Precompiled foo:hello.")); |
| 23 pubUpgrade(output: isNot(contains("Precompiled foo:hello."))); |
| 24 d.dir( |
| 25 p.join(appPath, '.pub', 'bin'), |
| 26 [ |
| 27 d.file('sdk-version', '0.1.2+3\n'), |
| 28 d.dir( |
| 29 'foo', |
| 30 [d.matcherFile('hello.dart.snapshot', contains('hello!'))])]).va
lidate(); |
| 31 }); |
| 32 } |
OLD | NEW |